私がハマったエラーと解決方法をまとめていきます。
誰かの役に立てれば幸いです。
まあ、エラーにぶち当たった分だけ成長出来るから、エラーを起こさないでスムーズに行った人は脆いんですよ。
戯言でした。
ケース1
Missing google_app_id. Firebase Analytics disabled.
発生環境
- Windows 10 Home 1903
- Android Studio 3.4.2
- dependencies: ‘com.google.gms:google-services:4.1.0’
原因
google_app_id が設定されていないため。
解決方法
strings.xml に、プロジェクトのアプリID を追加する。
問題点
‘com.google.gms:google-services:4.1.0’ を 4.2.0 に上げると、追加したものがエラーとなる。
その場合は、追加したものを削除したら問題なく動作した。
よくわからん。
おとなしく、最新版を使いましょうってことかな。
あと、エミュレーターだと上手くいかないときがあるから、実機でテストした方がよさそう。
ケース2
Gradle model not available, please check your gradle scripts and resync them with Android Studio using the Build menu.
Couldn’t retrieve Android gradle model for current Android model
発生環境
- Windows 10 Home 1903
- Android Studio 3.4.2
原因
firebase-core と、firebase-auth のバージョンが違うため。
解決方法
16.0.5 に合わせたら動いた。