Instant Run 的操做影响到了代码,致使Android App启动闪退的问题

 转自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

相关文章
相关标签/搜索