2016-10-08 87 views
0

無法獲取提供商com.google.firebase.provider.FirebaseInitProvider:由於此錯誤而運行該項目。我該如何解決它?請幫忙。無法獲取提供商com.google.firebase.provider.FirebaseInitProvider:

10-08 15:05:05.957 17562-17562/com.coretec.msacco E/AndroidRuntime: FATAL EXCEPTION: main 
                   Process: com.coretec.msacco, PID: 17562 
                   java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.coretec.msacco-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.coretec.msacco-2, /vendor/lib, /system/lib]] 
                    at android.app.ActivityThread.installProvider(ActivityThread.java:5055) 
                    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4626) 
                    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4566) 
                    at android.app.ActivityThread.access$1500(ActivityThread.java:151) 
                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402) 
                    at android.os.Handler.dispatchMessage(Handler.java:110) 
                    at android.os.Looper.loop(Looper.java:193) 
                    at android.app.ActivityThread.main(ActivityThread.java:5336) 
                    at java.lang.reflect.Method.invokeNative(Native Method) 
                    at java.lang.reflect.Method.invoke(Method.java:515) 
                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828) 
                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644) 
                    at dalvik.system.NativeStart.main(Native Method) 
                   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.coretec.msacco-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.coretec.msacco-2, /vendor/lib, /system/lib]] 
                    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 
                    at android.app.ActivityThread.installProvider(ActivityThread.java:5040) 
                    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4626)  
                    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4566)  
                    at android.app.ActivityThread.access$1500(ActivityThread.java:151)  
                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)  
                    at android.os.Handler.dispatchMessage(Handler.java:110)  
                    at android.os.Looper.loop(Looper.java:193)  
                    at android.app.ActivityThread.main(ActivityThread.java:5336)  
                    at java.lang.reflect.Method.invokeNative(Native Method)  
                    at java.lang.reflect.Method.invoke(Method.java:515)  
                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)  
                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)  
                    at dalvik.system.NativeStart.main(Native Method)  
+1

你有沒有在build.gradle中使用MultiDex true。 –

回答

5

避免在您的gradle文件中使用play-services作爲整體。 編譯「com.google.android.gms:發揮服務:9.8.0」 ,而不是使用特定的人 編譯「com.google.android.gms:發揮服務定位:9.8.0」

相關問題