gpt4 book ai didi

android - Gradle 同步失败 : Version: 5. 8.0 低于 google-services 插件所需的最低版本 (9.0.0)

转载 作者:行者123 更新时间:2023-11-29 16:45:38 25 4
gpt4 key购买 nike

我在我的应用程序中使用 admin SDK 但是当我同步我的项目时出现错误我尝试更改 admin SDK 版本但没有任何改变请帮助我正确同步我的项目,我已经找到了许多其他解决方案堆栈溢出错误,但他们没有解决我的问题

App.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'

Project.gradle

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-admin-sdk 用于:

compile 'com.google.firebase:firebase-admin:5.8.0'

在安卓系统中。因为它适用于您的服务器,而不适用于您的 Android 客户端。

请阅读更多信息 Add the Firebase Admin SDK to Your Server

来自文档:

Prerequisites
Before you begin, make sure you have the following:

  1. If using the Admin Node.js SDK, a server running Node.js 4.0+
  2. If using the Admin Java SDK, a server running Java 7+
  3. If using the Admin Python SDK, a server running Python 2.7+ or 3.x
  4. A server app

关于android - Gradle 同步失败 : Version: 5. 8.0 低于 google-services 插件所需的最低版本 (9.0.0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48516814/

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