您的位置:首页 > 移动开发 > Android开发

android启动应用java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack tra

2017-12-23 13:54 549 查看
在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

Disable 
Instant
Run 的方法如下:


File -> Settings -> Build, Execution, Deployment -> Instant Run

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐