Android Gradle同步失败:版本:5.8.0低于google services插件所需的最低版本(9.0.0)
我正在我的应用程序中使用admin SDK,但是当我同步我的项目时,我遇到了错误,我试图更改admin SDK版本,但没有任何更改。请帮助我正确同步我的项目。我在堆栈溢出中找到了许多解决此类错误的其他解决方案,但它们没有解决我的问题 App.Gradle文件Android Gradle同步失败:版本:5.8.0低于google services插件所需的最低版本(9.0.0),android,gradle,Android,Gradle,我正在我的应用程序中使用admin SDK,但是当我同步我的项目时,我遇到了错误,我试图更改admin SDK版本,但没有任何更改。请帮助我正确同步我的项目。我在堆栈溢出中找到了许多解决此类错误的其他解决方案,但它们没有解决我的问题 App.Gradle文件 apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "Myid" min
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "Myid"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.google.firebase:firebase-admin:5.8.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
// 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
}
Project.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "Myid"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.google.firebase:firebase-admin:5.8.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
// 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
}
您不能将firebase管理sdk用于:
compile 'com.google.firebase:firebase-admin:5.8.0'
在Android中。因为它是为你的服务器而设,而不是为你的Android客户端而设
请阅读更多
从文件中:
先决条件开始之前,请确保您具备以下条件:
为什么不使用最新的Gradle 11.8.0版?这是最新的版本。如果我更改gradle版本,它会工作吗?事实上,我没有更新android Studio你使用的是谷歌3.1.0版,所以你必须使用firebase的最新版本。是的,我使用的是firebase的最新版本。你能告诉我在上面的代码上我应该在哪里更改版本号,我应该输入哪个版本吗?这个等级是针对Java而不是android的,管理员版本不适用于android。我查一下有没有其他解决办法?那么,我如何使用android客户端实现这一点呢?您需要设置服务器以使用它,然后创建自定义api以与服务器通信。