gpt4 book ai didi

android - 库 com.google.android.gms :play-services-base is being requested by various other libraries at [[15. 0.1,15.0.1]],但解析为 16.0.1

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:42:27 36 4
gpt4 key购买 nike

我发现这显然是一个常见问题,但已发布的解决方案均不适合我。我已经检查过,我所有的播放服务和 firebase 库都是最新版本。

app/build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "jobquals"
minSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}
//com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
apply plugin: 'com.google.gms.google-services'

build.gradle 项目:

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0'
}
}

allprojects {
repositories {
google()
jcenter()
}
}

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

我也试过注释掉依赖项,但我得到了一个不同的错误(Unexpected end of ZLIB input stream)

最佳答案

选项 1

将你的谷歌服务版本降级到 3.2.1

classpath 'com.google.gms:google-services:3.2.1'

选项 2

build.gradle 底部的 apply plugin: 'com.google.gms.google-services' 之后,可以添加以下内容来解决问题。

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

关于android - 库 com.google.android.gms :play-services-base is being requested by various other libraries at [[15. 0.1,15.0.1]],但解析为 16.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52979121/

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