2016-10-19 33 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。