将Firebase Auth从版本9.6.1更新到9.8.0时的java.lang.IllegalAccessError

时间:2016-10-29 17:15:42

标签: java android firebase firebase-authentication dex

我最近在我的应用中将Firebase Auth版本更新为9.8.0 9.6.1。但是,当我运行应用程序时,它会立即崩溃。我在logcat中遇到以下错误:

java.lang.IllegalAccessError: Interface com.google.android.gms.internal.zzanb implemented by class com.google.firebase.auth.FirebaseAuth is inaccessible (declaration of 'com.google.firebase.auth.FirebaseAuth' appears in /data/data/com.svtech.thirdeye.thirdeye/files/instant-run/dex/slice-com.google.firebase-firebase-auth-9.6.1_65404207295ac58253e1599e984563499e3fff8b-classes.dex)
      at dalvik.system.DexFile.defineClassNative(Native Method)
      at dalvik.system.DexFile.defineClass(DexFile.java:226)
      at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
      at dalvik.system.DexPathList.findClass(DexPathList.java:338)
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
      at com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:90)
      at com.android.tools.fd.runtime.IncrementalClassLoader.findClass(IncrementalClassLoader.java:62)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
      at java.lang.Class.classForName(Native Method)
      at java.lang.Class.forName(Class.java:324)
      at java.lang.Class.forName(Class.java:285)
      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.initializeApp(Unknown Source)
      at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1801)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1776)
      at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
      at android.app.ActivityThread.installProvider(ActivityThread.java:5427)
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:5000)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4940)
      at android.app.ActivityThread.-wrap1(ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
      at android.os.Handler.dispatchMessage(Handler.java:111)
      at android.os.Looper.loop(Looper.java:207)
      at android.app.ActivityThread.main(ActivityThread.java:5728)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

导致此错误的原因是什么?我怎么能摆脱它?

1 个答案:

答案 0 :(得分:0)

禁用Android Studio上的即时运行并重新运行该应用。  要禁用即时运行:

  1. 打开“设置”或“偏好设置”对话框。
  2. 导航到Build, 执行,部署>即时跑步。
  3. 取消选中启用即时运行旁边的复选框。