Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

后端 未结 11 1324
粉色の甜心
粉色の甜心 2020-12-14 09:54

I tried using OkHttp and Picasso (following this answer) for disk caching of images that I was downloading from Firebase storage. Now, the app gives exceptions and crashes.

相关标签:
11条回答
  • 2020-12-14 10:50

    For me this problem was solved by Disable Instant Run

    Just go to Preferences -> Build, Execution, Deployment -> Instant Run -> Disable the option

    And restart the app

    0 讨论(0)
  • 2020-12-14 10:55

    Try removing .gradle folder from project.

    0 讨论(0)
  • 2020-12-14 10:55

    I've also had this problem, and it's still not possible to turn off the instant run.Later, I found that I deleted all the files under the build-cache folder, and then clean the project.My directory is C:\Users\ HDB . Android \ built-cache.I hope I can help other people who encounter this bug.

    0 讨论(0)
  • 2020-12-14 10:56

    This error also occurs because of the differences in libraries' version specification that can lead to runtime errors. Always use same versions of libraries in build.gradle.
    For example:

    Use this:

    implementation 'com.google.android.gms:play-services-location:11.6.0'
    implementation 'com.google.android.gms:play-services-auth:11.6.0'
    

    Instead of:

    implementation 'com.google.android.gms:play-services-location:15.0.0'
    implementation 'com.google.android.gms:play-services-auth:11.6.0'
    
    0 讨论(0)
  • 2020-12-14 11:01

    In Android Studio 2.3 and higher, There is Instant Run which may affect your code.

    Disable Instant Run

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

    In my case it was working perfect when run from Android Studio but crashing when install from other sources

    0 讨论(0)
提交回复
热议问题