gpt4 book ai didi

android - 错误 : In project 'app' a resolved Google Play services library dependency depends on another at an exact version

转载 作者:太空宇宙 更新时间:2023-11-03 13:39:55 27 4
gpt4 key购买 nike

当我尝试编译我的项目时,我遇到了以下错误

错误:在项目“app”中,已解决的 Google Play 服务库依赖项依赖于另一个确切版本(例如“[15.0.1]",但没有被解析为该版本。库表现出的行为将是未知的。

build.gradle(app)

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.spars.myapplication"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.razorpay:checkout:1.4.5'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.firebaseui:firebase-ui:3.3.1'
implementation 'com.android.support:cardview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
//add start
implementation "android.arch.lifecycle:extensions:1.1.1"
// Multidex
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-analytics:16.3.0'
//add finish
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:23.3.0'

}
apply plugin: 'com.google.gms.google-services'

//added part xxx
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}

}

build.gradle(项目)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}

allprojects {
repositories {
jcenter()
maven{
url "https://maven.google.com"
}
}
}

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

我收到以下错误

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0. 1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[ 15.0.1], but play-services-basement version was 16.0.1.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-firestore@15.0.0 -- Project 'app' depends onto com.google.firebase:firebase-storage-common@15.0.0 -- Project 'app' depends onto com.google.firebase:firebase-common@16.0.4 -- Project 'app' depends onto com.google.android.gms:play-services-basement@16.0.1 -- Project 'app' depends onto com.firebaseui:firebase-ui-database@3.3.1 -- Project 'app' depends onto com.google.firebase:firebase-auth@15.0.0 -- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1 -- Project 'app' depends onto com.firebaseui:firebase-ui-auth@3.3.1 -- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@16.3.0 -- Project 'app' depends onto com.google.firebase:firebase-analytics@16.3.0 -- Project 'app' depends onto com.firebaseui:firebase-ui-storage@3.3.1 -- Project 'app' depends onto com.firebaseui:firebase-ui-firestore@3.3.1 -- Project 'app' depends onto com.google.android.gms:play-services-auth-api-phone@15.0.1 -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@16.3.0 -- Project 'app' depends onto com.google.android.gms:play-services-measurement-base@16.3.0 -- Project 'app' depends onto com.google.firebase:firebase-iid@17.0.3 -- Project 'app' depends onto com.google.android.gms:play-services-auth@15.0.0 -- Project 'app' depends onto com.google.android.gms:play-services-stats@16.0.1 -- Project 'app' depends onto com.firebaseui:firebase-ui@3.3.1 -- Project 'app' depends onto com.google.firebase:firebase-storage@15.0.0 -- Project 'app' depends onto com.google.android.gms:play-services-flags@15.0.1 -- Project 'app' depends onto com.google.firebase:firebase-database@16.0.6 -- Project 'app' depends onto com.google.android.gms:play-services-auth-base@15.0.0 -- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1 -- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.1 -- Project 'app' depends onto com.google.android.gms:play-services-ads-identifier@16.0.0

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.

请帮忙

最佳答案

问题可能是由于您的 Firebase UI 版本 与您正在使用的 其他 Firebase 依赖项 的版本不兼容(其他需要更高的 Google Play 服务版本)。

如果你看here您将看到您的 Firebase UI 需要哪些版本。

也许您应该考虑更新您的 Firebase UI 版本,因为当前版本是 4.3.1

关于android - 错误 : In project 'app' a resolved Google Play services library dependency depends on another at an exact version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54606774/

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