转自yuhc163原文android启动应用java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack tra
在android studio 点击RUN运行应用APP,可以正常运行,但是将生成有APK,用adb install到系统,提示APP已经安装成功
但是运行应用就提示**应用已经停止运行,看log发现如下的信息
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tct.weather.provider.WeatherContentProvider"
java.lang.RuntimeException: Unable to get provider com.tct.weather.provider.WeatherContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.tct.weat
明明已经安装了应用为会什么会找不到类?同时android studio 点击RUN是可以正常运行的,APP没什么问题,后续查找资料,找到了原因:
在Android Studio 2.3 或者更高版本,有个 Instant Run 的操作影响到了我们的代码,需要disable
![](/qrcode.jpg)
Disable Instant Run 的方法如下:
File -> Settings -> Build, Execution, Deployment -> Instant Run