gpt4 book ai didi

android - 我试图将我的 Android 应用程序连接到 google firebase,但它显示错误

转载 作者:行者123 更新时间:2023-12-03 04:47:06 25 4
gpt4 key购买 nike

我尝试将我的应用程序连接到 google firebase,我按照程序在 Gradle 和 JSON 文件中实现。之后,我尝试运行我的应用程序并显示以下错误消息:

enter image description here

这是我的 Gradle 文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
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()

}
}


task clean(type: Delete) {
delete rootProject.buildDir

这是我的另一个 Gradle 模块:
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.ius"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.0.0'
implementation 'androidx.navigation:navigation-ui:2.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-auth:19.2.0'
testImplementation 'junit:junit:4.12'
implementation 'com.android.volley:volley:1.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

如果你能帮助我,那对我来说就意味着整个世界。提前致谢

最佳答案

更改您的 minSdkVersion 15minSdkVersion 16
作为Docs表示

Make sure that your app meets the following requirements: Targets API level 16 (Jelly Bean) or later

关于android - 我试图将我的 Android 应用程序连接到 google firebase,但它显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60335426/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com