繁体   English   中英

清单合并错误 - 支持库的不同版本

[英]Manifest Merger Error - Different versions of support library

我正在将步进器指示器库 - https://github.com/badoualy/stepper-indicator - 添加到我的项目中。 为此,我将jitpack添加到我的项目gradle文件中,并将stepper-indicator库添加到我的app gradle文件中。 但是,我收到以下构建错误:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:preference-v14:25.4.0] AndroidManifest.xml:25:13-35
    is also present at [com.android.support:appcompat-v7:26.0.0-beta2] AndroidManifest.xml:28:13-41 value=(26.0.0-beta2).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:23:9-25:38 to override.

我的应用程序中的其他依赖项包括:

compile 'com.android.support:preference-v7:25.4.0'
compile 'com.android.support:preference-v14:25.4.0'
compile 'eu.davidea:flexible-adapter:5.0.0-rc2'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-gcm:11.0.2'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.android.gms:play-services-ads:11.0.2'
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.squareup.okhttp3:okhttp:3.8.1'

如果不将所有Android支持库升级到alpha版本,是否有解决此问题的方法?

build.gradle您可以排除冲突的依赖项。 例如:

compile ('com.github.badoualy:stepper-indicator:1.0.7'){ 
    exclude group: 'com.android.support', module: 'appcompat-v7' 
}

要检查依赖项,可以在Android Studio中使用Gradle工具栏 - >应用程序模块 - >任务 - > android - > androidDependencies

更新:

在此输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM