TAKOYAKING’s blog 一覧

TAKOYAKING’s blog

たこ焼き系

Firebase

Unity: FirebaseでGradleでのビルドが通るまで

状況 Unity2020.3 -> Unity2021.3.31にアップデートしたときにFirebase関連のGradleでのビルドがうまく通らなくなりました。 環境 Unity2020.3.0 Unity2021.3.31 Firebase 11.3 Gradle エラー1 WARNING: The option 'android.enableR8' is deprecated and sh…

Unity: Firebaseでエラーが出た「Unable to find command line tool python required for Firebase Android resource generation. python is required to generate the Firebase Android resource file google-services.xml from Assets/FirebaseConfig/GoogleService-Info.plist. Wi

状況 Unable to find command line tool python required for Firebase Android resource generation. python is required to generate the Firebase Android resource file google-services.xml from Assets/FirebaseConfig/GoogleService-Info.plist. With…

Unity: 2022.3.11fにアップデートしたら「'AndroidSdkVersions.AndroidApiLevel21' is obsolete: 'Minimum supported Android API level is 22」というエラーが出た。

状況 Unity: 2022.3.11fにアップデートすると以下のようなエラーが出て実行できなくなりました。 Library/PackageCache/com.google.android.appbundle@1.4.0/Editor/Scripts/Internal/AssetPacks/AssetDeliveryWindow.cs(139,56): error CS0619: 'AndroidSdk…

FirebaseのUPMでの提供が終了したので.unitypackgeに移行したら罠にハマった

状況 UPM (unity package manager)でのfirebaseの提供がなくなったために、移行作業をする必要がありました。 .unitypackgeで導入する方法に切り替えましたが、大きく罠にハマりましました。 罠 .unitypackageで提供されるものとUPMで提供されるSDKは若干中…

Unity: iOSビルドすると「FirebaseAnalytics` requires CocoaPods version `>= 1.10.0」が出た

現象 FirebaseAnalytics` requires CocoaPods version `>= 1.10.0 UnityでiOSビルドを行うと上記のエラーが出てビルドができなかった 環境 Mac Unity 2020.3.0 解決策 Macでpod updateができない | Cocoamix.jp こちらを参考にします gem update -n /usr/loc…

Cloud Storage: 「Firebase.Storage.StorageException: Permission denied. Could not perform this operation Http Code: 403」

現象 Firebase.Storage.StorageException: Permission denied. Could not perform this operation Http Code: 403 google cloud storageでUnityからデータをダウンロードしようとすると上記のエラーがでた。 解決 Firebaseのログイン処理を通過して実行しな…

Firebase: 異なるcollection配下にある複数のDocumentにトランザクションを実行する方法

状況 異なるcollection配下にある複数のdocumentに対してtransactionを実行したい やり方 参考: Cloud Firestore で複数の DocumentReference に対し Transaction を実行する - Qiita同じトランザクションを使い回せば大丈夫なようです。 入れ子にした、違…

Firebase: Firebase Cloud StorageでiOSでGetFileAsyncを使うとUnknown Errorが発生する

やりたいこと iOSでFirebaseのStorageからファイルをダウンロードしたい。 現象 AndroidやUnity Editorではうまくいくのに、iOSだとUnknown Errorが発生して、ダウンロードできない。 原因 iOSに関してはfile://のようなuriを指定しなければならなかった 対…

Google cloud skdをインストールするとERROR: gcloud failed to load: dlopenが出る

Google cloud skdをインストールすると以下のエラーが出てインストールはできるけどgcloudコマンドが正しく動きませんでした。 ERROR: gcloud failed to load: dlopen(PATH/.pyenv/versions/3.7.3/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so, 2)…

Unity: mainTemplate.gradle file is using the old aaptOptions noCompress property definition which does not include types defined by unityStreamingAssets constant.

現象 mainTemplate.gradle file is using the old aaptOptions noCompress property definition which does not include types defined by unityStreamingAssets constant. 2020.2にUnityをアップデートしてAndroidビルドをすると上のようなエラーメッセージ…

Firebase: firebase deploy --only functionsを実行すると403エラー

現象 firebase deploy --only functions を行うと Error: HTTP Error: 403, Unknown Error が出ました。 解決策 Error: HTTP Error: 403, Unknown Error · Issue #641 · firebase/firebase-tools · GitHub 上のスレッドにあるように firebase logout firebas…

Unity: Unity EditorでFirebase RealtimeDatabaseを使うと「Could not initialize persistence: Unable to find app data directory」が出る

環境 firebase SDK 6.16.0 Mac 現象 再生するとクラッシュします。 原因 必要なフォルダがなぜか作成されていないのが原因です。 解決 Could not initialize persistence: Unable to find app data directory 直し方はここに書いてありました。 Firebase Dat…