It's my build.gradle
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-analytics:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-crash:16.0.0'
implementation 'com.google.firebase:firebase-perf:16.0.0'
and my android os verdion is android 8.0.0 (huawei), without google service
and then:
com.google.android.gms.internal.measurement.zzxz: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
at com.google.android.gms.internal.measurement.zzxy.zzsw(Unknown Source:50)
at com.google.firebase.crash.zzc.zzsu(Unknown Source:33)
at com.google.firebase.crash.zzd.call(Unknown Source:2)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:784)
java.lang.SecurityException: Failed to find provider com.google.android.gsf.gservices for user 0; expected to find a valid ContentProvider for this authority
at android.os.Parcel.readException(Parcel.java:1945)
at android.os.Parcel.readException(Parcel.java:1891)
at android.content.IContentService$Stub$Proxy.registerContentObserver(IContentService.java:768)
at android.content.ContentResolver.registerContentObserver(ContentResolver.java:1964)
at android.content.ContentResolver.registerContentObserver(ContentResolver.java:1953)
at com.google.android.gms.internal.firebase-perf.zza.zza(Unknown Source:38)
at com.google.android.gms.internal.firebase-perf.zzq.
at com.google.android.gms.internal.firebase-perf.zzg.zzp(Unknown Source:127)
at com.google.android.gms.internal.firebase-perf.zzg.zzb(Unknown Source:0)
at com.google.android.gms.internal.firebase-perf.zzh.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:784)
my targetSdkVersion is 26
and my android os verdion is android 8.0.0 (huawei), without google service
@LiuDongCai unfortunately I think this is expected. If you device doesn't have Google Play services then you will see errors like the DynamiteModule one you saw above.
Looking at your build.gradle, I have bolded the ones that definitely won't work without Play services. Your mileage may vary with the rest:
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-analytics:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-crash:16.0.0'
implementation 'com.google.firebase:firebase-perf:16.0.0'
hao can i do if i want it work in the phone without google services?
@LiuDongCai that's not possible right now.
I think that the correct behavior for analytics and messaging would be to just do nothing, without crashing
@samtstern iOS firebase work well without google play service, why android required google play service?
Most helpful comment
I think that the correct behavior for analytics and messaging would be to just do nothing, without crashing