zoukankan      html  css  js  c++  java
  • Instant Run 的操作影响到了代码,导致Android App启动闪退的问题

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

     

    Disable Instant Run 的方法如下:

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

     

     

     

     

  • 相关阅读:
    第八周上机作业
    第七次作业
    第七周上机
    第六周作业
    4.9上机作业
    第五周作业
    第四周作业
    第二次上机作业
    第三周作业
    第九周上机练习
  • 原文地址:https://www.cnblogs.com/arxive/p/9255977.html
Copyright © 2011-2022 走看看