Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to get provider com.crashlytics.android.CrashlyticsInitProvider java.lang.ClassNotFoundException

hello I use fabric for the crash but I'm having problems with Android below 5

error :

E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.crashlytics.android.CrashlyticsInitProvider" on path: DexPathList[[zip file "/data/app/ir.adp.picassoapp-2.apk"],nativeLibraryDirectories=[/data/app-lib/ir.adp.picassoapp-2, /vendor/lib, /system/lib, /data/datalib]] at android.app.ActivityThread.installProvider(ActivityThread.java:5184) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4733) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4666) at android.app.ActivityThread.access$1300(ActivityThread.java:166) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1439) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5455) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:966) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:733) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.crashlytics.android.CrashlyticsInitProvider" on path: DexPathList[[zip file "/data/app/ir.adp.picassoapp-2.apk"],nativeLibraryDirectories=[/data/app-lib/ir.adp.picassoapp-2, /vendor/lib, /system/lib, /data/datalib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53) at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at java.lang.ClassLoader.loadClass(ClassLoader.java:461) at android.app.ActivityThread.installProvider(ActivityThread.java:5169) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4733)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4666)  at android.app.ActivityThread.access$1300(ActivityThread.java:166)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1439)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:194)  at android.app.ActivityThread.main(ActivityThread.java:5455)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:525)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:966)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:733)  at dalvik.system.NativeStart.main(Native Method) 

Please help me

like image 781
ali modares Avatar asked Apr 12 '18 12:04

ali modares


2 Answers

Enable multidex for devices with Android API prior to 21, Include the multidex library :

implementation 'com.android.support:multidex:1.0.2'

and extend MultiDexApplication in your Application class

like image 192
Deˣ Avatar answered Sep 20 '22 16:09

Deˣ


Add multidex library into your app build Gradle and enabled multiDex true in defaultConfig

compile 'com.android.support:multidex:1.0.1'
like image 42
Swati Dongre Avatar answered Sep 18 '22 16:09

Swati Dongre