Android Firebase:无法解析 [英] Android Firebase: Could not parse
问题描述
我尝试将Firebase与我的应用程序连接,但出现此错误
I tried connecting Firebase with my app and this error came
这是我的build.gradle(项目)
This is my build.gradle (Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是我的build.gradle(模块)
This is my build.gradle (Module)
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.android.application"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.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
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
我尝试从此答案中检查.gzips Android应用程序没有连接到Firebase ,但未找到任何.gzips文件
I tried checking for .gzips from this answer Android app does not connect to Firebase but didn't find any .gzips file
该怎么办...
推荐答案
好吧,我在发布问题仅几分钟后就得到了答案,我想删除它,但我保留了它,因为其他人可能会遇到这个要答案,所以我走了.
Well, I got the answer just a few minutes after I posted the question and I thought of deleting it but I'm keeping it since other people might run into this asking for an answer so here I go.
在文件/项目结构/项目"中,将Android Gradle插件版本更改为4.1.3,并将Gradle版本更改为6.5.
In File/Project Structure/Project, change the Android Gradle Plugin Version to 4.1.3 and the Gradle Version to 6.5.
我希望这对某人有帮助,因为这一定对我有所帮助!
I hope this helps someone because this sure helped me!
这篇关于Android Firebase:无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!