我正在使用最新版本的 Android Studio 和所有插件。我正在尝试将 Android 应用程序连接到 firebase 控制台。已成功下载 google-services.json 文件并添加到模块根目录。在 build.gradle 文件中添加了“classpath 'com.google.gms: google-services: 4.3.3”和“apply plugin:' com.google.gms.google-services'”行。
build.gradle项目级别:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
build.gradle应用程序级别:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "app"
minSdkVersion 16
targetSdkVersion 29
versionCode 42
versionName …Run Code Online (Sandbox Code Playgroud)