2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Flutter】firebaseとflutter連携時のエラー解消

Posted at

flutterとfirebaseを連携させたときに出合ったエラーと試したこと、解決法のメモです。

環境

flutter : 3.24.3
firebase_core: ^3.6.0
cloud_firestore: ^5.4.4
debugした機種のgoogle play service のversion : 3.24.41

出会ったエラー

W/DynamiteModule( 1123): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 1123): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 1123): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
D/nativeloader( 1123): Extending system_exposed_libraries: libvraudio_client.qti.so:libbinauralrenderer_wrapper.qti.so:libhoaeffects.qti.so:libQOC.qti.so:libupdateprof.qti.so:libQOC.qti.so:libdiag_system.qti.so:libqape.qti.so:libqesdk_ndk_platform.qti.so:liblistenjni.qti.so
W/ziparchive( 1123): Unable to open '/apex/com.android.extservices/javalib/android.ext.adservices.dm': No such file or directory
W/ziparchive( 1123): Unable to open '/apex/com.android.extservices/javalib/android.ext.adservices.dm': No such file or directory
D/nativeloader( 1123): Extending system_exposed_libraries: libvraudio_client.qti.so:libbinauralrenderer_wrapper.qti.so:libhoaeffects.qti.so:libQOC.qti.so:libupdateprof.qti.so:libQOC.qti.so:libdiag_system.qti.so:libqape.qti.so:libqesdk_ndk_platform.qti.so:liblistenjni.qti.so
D/nativeloader( 1123): InitApexLibraries:
D/nativeloader( 1123):   com_android_appsearch: libicing.so
D/nativeloader( 1123):   com_android_art: libartservice.so
D/nativeloader( 1123):   com_android_conscrypt: libjavacrypto.so
D/nativeloader( 1123):   com_android_extservices: libtflite_support_classifiers_native.so
D/nativeloader( 1123):   com_android_mediaprovider: libpdfclient.so
D/nativeloader( 1123):   com_android_os_statsd: libstats_jni.so
D/nativeloader( 1123):   com_android_tethering: libandroid_net_connectivity_com_android_net_module_util_jni.so:libcrypto.so:libframework-connectivity-jni.so:libframework-connectivity-tiramisu-jni.so:libmainlinecronet.126.0.6423.0.so:libservice-connectivity.so:libservice-thread-jni.so:libssl.so
permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/nativeloader( 1123): Extending system_exposed_libraries: libvraudio_client.qti.so:libbinauralrenderer_wrapper.qti.so:libhoaeffects.qti.so:libQOC.qti.so:libupdateprof.qti.so:libQOC.qti.so:libdiag_system.qti.so:libqape.qti.so:libqesdk_ndk_platform.qti.so:liblistenjni.qti.so
D/nativeloader( 1123): Extending system_exposed_libraries: libvraudio_client.qti.so:libbinauralrenderer_wrapper.qti.so:libhoaeffects.qti.so:libQOC.qti.so:libupdateprof.qti.so:libQOC.qti.so:libdiag_system.qti.so:libqape.qti.so:libqesdk_ndk_platform.qti.so:liblistenjni.qti.so
W/ProviderInstaller( 1123): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]    
V/NativeCrypto( 1123): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 305 native methods...
W/mple.eki_kugur( 1123): Accessing hidden method Ldalvik/system/VMStack;->getStackClass2()Ljava/lang/Class; (unsupported, reflection, allowed)
E/GoogleApiManager( 1123): Failed to get service from broker. 
E/GoogleApiManager( 1123): java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'.
E/GoogleApiManager( 1123):      at android.os.Parcel.createExceptionOrNull(Parcel.java:2442)
E/GoogleApiManager( 1123):      at android.os.Parcel.createException(Parcel.java:2426)
E/GoogleApiManager( 1123):      at android.os.Parcel.readException(Parcel.java:2409)
E/GoogleApiManager( 1123):      at android.os.Parcel.readException(Parcel.java:2351)
E/GoogleApiManager( 1123):      at android.os.Handler.handleCallback(Handler.java:938)
E/GoogleApiManager( 1123):      at android.os.Handler.dispatchMessage(Handler.java:99)
E/GoogleApiManager( 1123):      at android.os.Looper.loopOnce(Looper.java:233)
E/GoogleApiManager( 1123):      at android.os.Looper.loop(Looper.java:344)
E/GoogleApiManager( 1123):      at android.os.HandlerThread.run(HandlerThread.java:67)
W/CondFlagRegistrar( 1123): Failed to register com.google.android.gms.providerinstaller#com.google.android.gms
W/CondFlagRegistrar( 1123): ehvp: 17: 17: API: Phenotype.API is not available on this device. Connection failed with: ConnectionResult{statusCode=DEVELOPER_ERROR, resolution=null, message=null}
W/CondFlagRegistrar( 1123):     at ambg.onConnectionFailed(:com.google.android.gms@244035030@24.40.35 (190408-683445800):2)
W/CondFlagRegistrar( 1123):     at android.os.Handler.handleCallback(Handler.java:938)
W/CondFlagRegistrar( 1123):     at android.os.Handler.dispatchMessage(Handler.java:99)
W/CondFlagRegistrar( 1123):     at brnl.mz(:com.google.android.gms@244035030@24.40.35 (190408-683445800):1)
W/CondFlagRegistrar( 1123):     at brnl.dispatchMessage(:com.google.android.gms@244035030@24.40.35 (190408-683445800):5)
W/CondFlagRegistrar( 1123):     at android.os.Looper.loopOnce(Looper.java:233)
W/CondFlagRegistrar( 1123):     at android.os.Looper.loop(Looper.java:344)
W/CondFlagRegistrar( 1123):     at android.os.HandlerThread.run(HandlerThread.java:67)
W/CondFlagRegistrar( 1123): Caused by: alxi: 17: API: Phenotype.API is not available on this device. Connection failed with: ConnectionResult{statusCode=DEVELOPER_ERROR, resolution=null, message=null}
W/CondFlagRegistrar( 1123):     at amtt.a(:com.google.android.gms@244035030@24.40.35 (190408-683445800):15)
W/CondFlagRegistrar( 1123):     at alyt.a(:com.google.android.gms@244035030@24.40.35 (190408-683445800):1)
W/CondFlagRegistrar( 1123):     at alyq.c(:com.google.android.gms@244035030@24.40.35 (190408-683445800):5)
W/CondFlagRegistrar( 1123):     ... 12 more
W/mple.eki_kugur( 1123): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (unsupported, reflection, allowed)
W/mple.eki_kugur( 1123): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (unsupported, reflection, allowed)
W/mple.eki_kugur( 1123): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (unsupported, reflection, allowed)
E/GoogleApiManager( 1123): Failed to get service from broker. 
E/GoogleApiManager( 1123): java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'.
E/GoogleApiManager( 1123):      at android.os.Parcel.createExceptionOrNull(Parcel.java:2442)
E/GoogleApiManager( 1123):      at android.os.Parcel.createException(Parcel.java:2426)
E/GoogleApiManager( 1123):      at android.os.Parcel.readException(Parcel.java:2409)
  • 試したこと(直接解決には至らず)

  • google play serviceのアップデート

  • multiDexEnabled をtrueにした

  • AndroidManifest.xmlに

<uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

を追加

  • 直接解決したもの

google-services.jsonにアプリが登録されていたが、設定時のミスなのか2つ登録されていた。
firebaseのconsoleからアプリを消してgoogle-services.jsonを再ダウンロードし、android/に置き直すとエラーが解消された

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?