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

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


1)Kindly uninstall the app from your mobile

2)Reinstall the app now from android studio

3)98% it will work else clean the project and reinstall it again


You may need to enable multidex, follow the guide from this

https://developer.android.com/studio/build/multidex.html ,for enabling multidex

  defaultConfig {

    minSdkVersion 14
    targetSdkVersion 21

    multiDexEnabled true
}

 dependencies {
     compile 'com.android.support:multidex:1.0.0'
 }