1. 最近用android studio開發項目的時候遇到了這個問題,google了很久,加上自己的修改解決了這個問題:
2. 報錯log: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication:
java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path:
原因: SDK版本太低不支援Instant Run導緻的
解決辦法:
a. 打開File->Settings 或者 Preferences 導航框。
b.找到 Build, Execution, Deployment > Instant Run, 把Enable Instant Run......前面的勾去掉, 這就 禁掉了Instant Run, 重新rebuild project
PS: Instant Run僅支援Gradle 版本 2.0.0 或更高版本,以及在app下的 build.gradle 檔案中配置minSdkVersion
15 或以上Instant Run 才支援, minSdkVersion 為21 或更高性能更好
禁掉Instant Run可能會導緻别的問題
轉自:https://blog.csdn.net/likesidehu/article/details/52606373