2016-10-19 31 views
0

我已遵循Firebase快速入門指南完成Firebase的初始設置。我還沒有使用它的任何類,只是做了基本的設置以備後用。但是現在我在logcat中出現錯誤。請注意,錯誤不會導致崩潰(但,不知道)初始Firebase設置後出現錯誤

以下是錯誤:

Task exception on worker thread: 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 'com.google.firebase.iid.zzg' appears in /data/data/myPackageName/files/instant-run/dex/slice-com.google.firebase-firebase-iid-9.0.0_some-ID-which-I-think-shouldn't-be-exposed-here-classes.dex): com.google.android.gms.measurement.internal.zzt.zzEd(Unknown Source)

那麼,什麼是這個錯誤呢?我應該忽略它並繼續嗎?

+0

看到這個相關的問題和答案:http://stackoverflow.com/q/37312340/4815718 –

回答

0

只需在您的Gradle文件中使用compile 'com.google.firebase:firebase-database:10.0.1'而不是compile 'com.firebase:firebase-client-android:2.5.2'即可。 在我的情況下工作沒有erros。