修改代码之后,点击运行,AndroidStudio没有进行重新编译,而是提示no changes to deploy,然后启动修改前的那个APP,代码修改完全没用。这个问题初步判断是由于AndroidStudio的Instant run功能出错导致的。目前只能在settings->Build,Execution,Deployment->Instant Run中将Enable Instant Run to hot swap code/resource changes on deploy选项的勾点掉。这是默认启用的。点掉之后就正常了,每次点击运行都会重新安装APP。
Error while executing: am start -n "" -a android.intent.action.MAIN -c android.intent.category.LAUNC
Error while executing: am start -n "package_name/package_name.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNC修改配置文件而没有修改代码的情况下,AndroidStudio默认为代码没有改变,因此没有重新安装APK。可