gpt4 book ai didi

android - Firebase 在 Android Instant 应用程序中崩溃

转载 作者:搜寻专家 更新时间:2023-11-01 08:25:12 24 4
gpt4 key购买 nike

我正在尝试使用以下方法在 Android 免安装应用中初始化 Firebase(11.2.0):

FirebaseApp.initializeApp(this);

但它抛出以下异常,说明不支持 jobscheduler:

      E/FirebaseApp: Firebase API initialization failure.
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
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.hello.world.myapp.provider.MyApplication.onCreate(MyApplication.java:93)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5403)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
Caused by: java.lang.SecurityException: Service: jobscheduler is not supported.
at android.os.Parcel.readException(Parcel.java:1684)
at android.os.Parcel.readException(Parcel.java:1637)
at android.app.job.IJobScheduler$Stub$Proxy.cancel(IJobScheduler.java:202)
at android.app.JobSchedulerImpl.cancel(JobSchedulerImpl.java:60)
at com.google.android.gms.internal.zzcfj.zzazu(Unknown Source)
at com.google.android.gms.internal.zzcfj.zzuh(Unknown Source)
at com.google.android.gms.internal.zzcdm.initialize(Unknown Source)

我遵循了 android 开发者文档中给出的集成说明 here .

最佳答案

这可能是一个 Firebase 错误。此 Firebase Google Groups post 中出现相同的堆栈跟踪. Firebase 团队成员 Ian Barber 在 8 月 2 日回复了该帖子并表示:

We have found an issue where Google Analytics for Firebase calls JobScheduler, which is unfortunately unsupported in instantapps. We have a fix internally, but unfortunately it has to go on to a fairly long release chain, so it will be several weeks before it hits SDK manager.

我建议您联系 Firebase support .

关于android - Firebase 在 Android Instant 应用程序中崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46013119/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com