这很奇怪。
我已将Firebase与android studio向导集成。它可以完美地在平板电脑上运行,但是当我在手机上运行应用程序时,会引发以下情况:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.rhyboo.net.puzzleplus, PID: 26597
java.lang.AbstractMethodError: abstract method "com.google.android.gms.tasks.Task com.google.firebase.iid.WithinAppServiceBinder$IntentHandler.zza(android.content.Intent)"
at com.google.firebase.iid.WithinAppServiceBinder.zza(com.google.firebase:firebase-iid@@20.2.2:9)
at com.google.firebase.iid.zzaw.zza(com.google.firebase:firebase-iid@@20.2.2:30)
at com.google.firebase.iid.zzaw.onServiceConnected(com.google.firebase:firebase-iid@@20.2.2:59)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1948)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1980)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
即使我注释了所有代码并留空onCreate
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
甚至更奇怪的是,崩溃仅在首次启动应用程序时发生。进一步的发射没有崩溃