Android Studio Firebase 錯誤:"Could not parse the Android Application Module's Gradle config. Resolve



这是我第一次在android studio中使用firebase,我想使用实时数据库。当我点击连接助手内部的firebase时,我收到消息"Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync."我在这里看到了很多答案,每个人都删除了不同的内容。

我不知道我应该从我的模块中删除什么,我可以需要你的帮助。

我的build.gradle模块

plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.covid19gate"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.yarolegovich:discrete-scrollview:1.5.1'
implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

转到您的"项目";(不是应用程序(

allprojects {
repositories {
google()
mavenCentral()
}
} 

并从中移除jcenter()线

最新更新