首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何解决错误:在项目'app‘中解决了Google Play服务库的依赖关系

如何解决错误:在项目'app‘中解决了Google Play服务库的依赖关系
EN

Stack Overflow用户
提问于 2019-06-19 04:38:48
回答 1查看 4.8K关注 0票数 4

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

代码语言:javascript
复制
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

代码语言:javascript
复制
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'
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56656719

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档