如何在android中修复Firebase的bug

时间:2016-07-27 16:36:04

标签: android firebase notifications google-cloud-messaging

应用程序启动后

秒,它在日志中出现此错误:

07-27 11:27:33.261 27740-27740/com.msi.eluniversal E/AndroidRuntime: FATAL EXCEPTION: main

Process: com.msi.eluniversal, PID: 27740

java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
        at com.google.firebase.iid.zzg.zzeC(Unknown Source)
        at com.google.firebase.iid.zzg.<init>(Unknown Source)
        at com.google.firebase.iid.zzg.<init>(Unknown Source)
        at com.google.firebase.iid.zzd.zzb(Unknown Source)
        at com.google.firebase.iid.FirebaseInstanceIdService.zziB(Unknown Source)
        at com.google.firebase.iid.FirebaseInstanceIdService.zzA(Unknown Source)
        at com.google.firebase.iid.zzb.onStartCommand(Unknown Source)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3916)
        at android.app.ActivityThread.access$2300(ActivityThread.java:198)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1780)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:145)
        at android.app.ActivityThread.main(ActivityThread.java:6843)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
            07-27 11:27:39.151 27740-27881/com.msi.eluniversal E/GAv4: Successfully bound to service but never got onServiceConnected callback
            07-27 11:29:03.581 27740-27740/com.msi.eluniversal I/Process: Sending signal. PID: 27740 SIG: 9
            07-27 11:29:03.831 31553-31553/com.msi.eluniversal D/TimaKeyStoreProvider: TimaSignature is unavailable
            07-27 11:29:03.841 31553-31553/com.msi.eluniversal D/ActivityThread: Added TimaKeyStore provider
            07-27 11:29:03.851 31553-31553/com.msi.eluniversal I/ActivityThread: Switching default density from 640 to 480
            07-27 11:29:03.851 31553-31553/com.msi.eluniversal I/InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}
            07-27 11:29:03.861 31553-31553/com.msi.eluniversal I/InjectionManager: Inside getClassLibPath caller 
            07-27 11:29:03.971 31553-31553/com.msi.eluniversal D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
            07-27 11:29:03.981 31553-31553/com.msi.eluniversal A/FirebaseApp: Firebase API initialization failure.
                                                                              java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.google.firebase.FirebaseApp.zza(Unknown Source)
        at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
        at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
        at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1737)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1712)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6384)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5979)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5919)
        at android.app.ActivityThread.access$1700(ActivityThread.java:198)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1743)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:145)
        at android.app.ActivityThread.main(ActivityThread.java:6843)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
        Caused by: java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
        at com.google.firebase.iid.zzg.zzeC(Unknown Source)
        at com.google.firebase.iid.zzg.<init>(Unknown Source)
        at com.google.firebase.iid.zzg.<init>(Unknown Source)
        at com.google.firebase.iid.zzd.zzb(Unknown Source)
        at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source)
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.google.firebase.FirebaseApp.zza(Unknown Source) 
        at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
        at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
        at com.google.firebase.FirebaseApp.zzbu(Unknown Source) 
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) 
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1737) 
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1712) 
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) 
        at android.app.ActivityThread.installProvider(ActivityThread.java:6384) 
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5979) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5919) 
        at android.app.ActivityThread.access$1700(ActivityThread.java:198) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1743) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:145)                                                                           at android.app.ActivityThread.main(ActivityThread.java:6843) 
        at java.lang.reflect.Method.invoke(Native Method)                                                                           at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
            07-27 11:29:03.981 31553-31553/com.msi.eluniversal D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
            07-27 11:29:04.031 31553-31553/com.msi.eluniversal I/FA: App measurement is starting up, version: 9080
            07-27 11:29:04.031 31553-31553/com.msi.eluniversal I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
            07-27 11:29:04.081 31553-31553/com.msi.eluniversal D/FirebaseApp: Initialized class com.google.android.gms.measurement.AppMeasurement.
            07-27 11:29:04.081 31553-31553/com.msi.eluniversal I/FirebaseInitProvider: FirebaseApp initialization successful
            07-27 11:29:04.091 31553-31584/com.msi.eluniversal V/GoogleSignatureVerifier: com.google.android.gms signature not valid.  Found

我不知道这个错误是多么正确,我不会使用Firebase或GCM谷歌

我正在使用下一个库:

compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile 'com.google.android.gms:play-services-appindexing:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-plus:9.0.0'
compile 'com.firebase:firebase-client-android:2.5.2'

和int项目gradle使用此类路径:

classpath 'com.google.gms:google-services:3.0.0'

0 个答案:

没有答案