I am trying to initialize Firebase(11.2.0) in an Android instant app using:
FirebaseApp.initializeApp(this);
But it throws following exception stating jobscheduler is not supported:
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)
I followed integration instructions given on android developer docs here.
This may be a Firebase bug. The same stack trace appears in this Firebase Google Groups post. Ian Barber, a Firebase team member, replied to the post on August 2nd and said:
I recommend you contact Firebase support.