gpt4 book ai didi

android - 如何解决错误 : In project 'app' a resolved Google Play services library dependency

转载 作者:搜寻专家 更新时间:2023-11-01 09:20:15 34 4
gpt4 key购买 nike

在我将 com.google.android.gms:play-services-ads 依赖项从 17.2.0 更新到 18.0.0 之后,我出现以下错误:

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

Dependency failing: com.google.android.gms:play-services-measurement-api:16.5.0 -> com.google.android.gms:play-services-
measurement-sdk-api@[16.5.0], but play-services-measurement-sdk-api version was 17.0.0.

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.android.gms:play-services-ads@18.0.0
-- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 16.5.0}
-- Project 'app' depends onto com.google.android.gms:play-services-ads@{strictly 18.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@{strictly 16.5.0}
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-sdk@{strictly 16.5.0}
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-sdk-api@{strictly 17.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
-- Project 'app' depends onto com.google.android.gms:play-services-ads-lite@{strictly 18.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-core@{strictly 16.0.9}

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.

Gradle

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.github.dimitrisCBR:GradientTextView:1.2'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.mediarouter:mediarouter:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'dev.dworks.libs:volleyplus:0.1.4'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.github.pedromassango:doubleClick:3.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.firebase:firebase-jobdispatcher:0.6.0'
implementation project(':library')
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.yarolegovich:discrete-scrollview:1.4.9'
implementation 'com.github.esafirm.android-image-picker:imagepicker:1.12.0'
implementation 'jp.wasabeef:glide-transformations:4.0.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.vodyasov:amr:0.5'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'com.google.guava:guava:26.0-android'
testImplementation 'junit:junit:4.12'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'
implementation 'com.google.android.exoplayer:exoplayer:2.10.1'
implementation 'com.squareup:otto:1.3.8'
implementation 'org.apache.commons:commons-collections4:4.3'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.2'
implementation 'com.google.android.gms:play-services-ads:18.0.0'
}
apply plugin: 'com.google.gms.google-services'

最佳答案

您的 Gradle 文件中的依赖项似乎存在版本冲突。

请查看Release Notes June 17, 2019找到它们。

Artifacts released on maven.google.com
com.google.android.gms:play-services-ads:18.0.0
com.google.firebase:firebase-core:17.0.0
com.google.firebase:firebase-messaging:19.0.0

等等

在你的代码中,firebase 相关的似乎是基于 May 07, 2019 的发布。

implementation 'com.google.android.gms:play-services-ads:18.0.0'
implementation 'com.google.firebase:firebase-core:16.0.9' // old
implementation 'com.google.firebase:firebase-messaging:18.0.0' // old

关于android - 如何解决错误 : In project 'app' a resolved Google Play services library dependency,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56656719/

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