Проблема:
Сбой приложения com.google.gms:google-services :4.3.15
ФАТАЛЬНОЕ ИСКЛЮЧЕНИЕ: main
java.lang.RuntimeException: невозможно начать действие ComponentInfo{com.xxx.yyy/com. xxx.yyy.MainActivity}: java.lang.IllegalStateException: FirebaseApp по умолчанию не инициализируется в этом процессе com.xxx.yyy Обязательно сначала вызовите FirebaseApp.initializeApp(Context).
Ниже приведен старый формат файла gradle, и я использовал его в Android Girafe.
build.gradle (Project)
Код: Выделить всё
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
classpath 'com.google.gms:google-services:4.3.15'
}
}
Код: Выделить всё
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
dependencies {
implementation platform('com.google.firebase:firebase-bom:26.8.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-database-ktx'
implementation 'com.google.firebase:firebase-storage-ktx'
}
apply plugin: 'com.google.gms.google-services'
Подробнее здесь: https://stackoverflow.com/questions/787 ... ices4-3-15