前提・実現したいこと
下記のサイトのFlutterからの操作を参考に
Cloud Firestoreにある
’testField: "test"’ の取得を試みてますが、
以下の該当ソースコードからにてエラーが出ます。
参考サイト(参考箇所まで飛べます)
発生している問題・エラーメッセージ
W/DynamiteModule(26611): Local module descriptor class for providerinstaller not found. I/DynamiteModule(26611): Considering local module providerinstaller:0 and remote module providerinstaller:0 W/ProviderInstaller(26611): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0. I/me.firebasetes(26611): The ClassLoaderContext is a special shared library. I/me.firebasetes(26611): The ClassLoaderContext is a special shared library. I/TetheringManager(26611): registerTetheringEventCallback:com.me.firebasetest I/me.firebasetes(26611): The ClassLoaderContext is a special shared library. V/NativeCrypto(26611): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 294 native methods... W/me.firebasetes(26611): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed) I/ProviderInstaller(26611): Installed default security provider GmsCore_OpenSSL W/me.firebasetes(26611): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (greylist, reflection, allowed) W/me.firebasetes(26611): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, linking, allowed) W/me.firebasetes(26611): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, linking, allowed) W/me.firebasetes(26611): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed) W/me.firebasetes(26611): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (greylist,core-platform-api, linking, allowed) W/me.firebasetes(26611): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (greylist, linking, allowed) W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WatchStream]: (de17319) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null} W/Firestore(26611): This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. I/chatty (26611): uid=10154(com.me.firebasetest) FirestoreWorker identical 1 line W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}. W/Firestore(26611): (24.0.0) [WriteStream]: (6230260) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project fir-test-3c5e7., cause=null}.
該当のソースコード,画像
Dart
1class _LoginState extends State<Login> { 2 3 4 Widget build(BuildContext context) { 5 return Scaffold( 6中略 7 ), 8 9 floatingActionButton: FloatingActionButton( 10 onPressed: () async{ 11 await FirebaseFirestore.instance >>>問題箇所 12 .collection('testCollection') 13 .doc('testDocument1') 14 .get() 15 .then((ref){ 16 print(ref.get('testField'));>>>問題箇所 17 }); 18 }, 19 ), 20 21下記省略
試したこと
・androidmanifestxml
<uses-permission android:name="android.permission.INTERNET"/>を追加
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.me.firebasetest"> <uses-permission android:name="android.permission.INTERNET"/> >>>追加部分 <application 下記省略
・グーグルサインイン
こちらは成功しているので少なくともFirebaseとは連携できているかと思います。
補足情報(FW/ツールのバージョンなど)
Windows10 AndroidStudio 4.1.3 Flutter Dart
あなたの回答
tips
プレビュー