轉自yuhc163原文android啓動應用java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trajava
在android studio 點擊RUN運行應用APP,能夠正常運行,可是將生成有APK,用adb install到系統,提示APP已經安裝成功android
可是運行應用就提示**應用已經中止運行,看log發現以下的信息ide
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace availableui
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tct.weather.provider.WeatherContentProvider"spa
java.lang.RuntimeException: Unable to get provider com.tct.weather.provider.WeatherContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.tct.weat.net
明明已經安裝了應用爲會什麼會找不到類?同時android studio 點擊RUN是能夠正常運行的,APP沒什麼問題,後續查找資料,找到了緣由:code
在Android Studio 2.3 或者更高版本,有個 Instant Run 的操做影響到了咱們的代碼,須要disableblog
Disable Instant Run 的方法以下:
get
File -> Settings -> Build, Execution, Deployment -> Instant Runit