无法获得提供者com.crashlytics.android.CrashlyticsInitProvider java.lang.ClassNotFoundException

时间:2018-04-12 12:58:30

标签: android android-studio

你好我使用面料进行崩溃,但我遇到了Android低于5

的问题

错误:

  

E / AndroidRuntime:致命异常:主要                     java.lang.RuntimeException:无法获取提供者com.crashlytics.android.CrashlyticsInitProvider:java.lang.ClassNotFoundException:未在路径上找到类“com.crashlytics.android.CrashlyticsInitProvider”:DexPathList [[zip file“/ data / app / ir.adp.picassoapp-2.apk“],nativeLibraryDirectories = [/ data / app-lib / ir.adp.picassoapp-2,/ vendor / lib,/ system / lib,/ data / datalib]]                         在android.app.ActivityThread.installProvider(ActivityThread.java:5184)                         在android.app.ActivityThread.installContentProviders(ActivityThread.java:4733)                         在android.app.ActivityThread.handleBindApplication(ActivityThread.java:4666)                         在android.app.ActivityThread.access $ 1300(ActivityThread.java:166)                         在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1439)                         在android.os.Handler.dispatchMessage(Handler.java:107)                         在android.os.Looper.loop(Looper.java:194)                         在android.app.ActivityThread.main(ActivityThread.java:5455)                         at java.lang.reflect.Method.invokeNative(Native Method)                         在java.lang.reflect.Method.invoke(Method.java:525)                         在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:966)                         在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:733)                         at dalvik.system.NativeStart.main(Native Method)                      引起:java.lang.ClassNotFoundException:在路径上找不到类“com.crashlytics.android.CrashlyticsInitProvider”:DexPathList [[zip file“/data/app/ir.adp.picassoapp-2.apk"],nativeLibraryDirectories = [/ data / app-lib / ir.adp.picassoapp-2,/ vendor / lib,/ system / lib,/ data / datalib]]                         在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)                         at java.lang.ClassLoader.loadClass(ClassLoader.java:501)                         在java.lang.ClassLoader.loadClass(ClassLoader.java:461)                         在android.app.ActivityThread.installProvider(ActivityThread.java:5169)                         在android.app.ActivityThread.installContentProviders(ActivityThread.java:4733)                         在android.app.ActivityThread.handleBindApplication(ActivityThread.java:4666)                         在android.app.ActivityThread.access $ 1300(ActivityThread.java:166)                         在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1439)                         在android.os.Handler.dispatchMessage(Handler.java:107)                         在android.os.Looper.loop(Looper.java:194)                         在android.app.ActivityThread.main(ActivityThread.java:5455)                         at java.lang.reflect.Method.invokeNative(Native Method)                         在java.lang.reflect.Method.invoke(Method.java:525)                         在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:966)                         在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:733)                         在dalvik.system.NativeStart.main(本地方法)

请帮帮我

2 个答案:

答案 0 :(得分:15)

启用multidex 适用于21之前的Android API的设备, 包括multidex库:

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

并在Application类中扩展MultiDexApplication

答案 1 :(得分:1)

将multidex库添加到您的app build Gradle中,并在defaultConfig中启用multiDex true

compile 'com.android.support:multidex:1.0.1'