【问题标题】:Manifest merger failed error when try to upgrade to 26.0.0-alpha1尝试升级到 26.0.0-alpha1 时出现清单合并失败错误
【发布时间】:2017-11-03 12:07:12
【问题描述】:

我有这些依赖:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    //compile 'com.android.support:mediarouter-v7:25.3.1'
    compile('com.mikepenz:materialdrawer:5.8.1@aar') {
        transitive = true
    }
    compile 'com.afollestad.material-dialogs:core:0.9.4.3'
    compile 'commons-io:commons-io:2.5'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.sothree.slidinguppanel:library:3.1.1'
    compile 'com.makeramen:roundedimageview:2.3.0'
    compile 'com.google.android.gms:play-services-location:11.0.4'
    compile 'com.google.android.gms:play-services-maps:11.0.4'
    compile 'com.google.android.gms:play-services-ads:11.0.4'
    compile 'com.google.android.gms:play-services-places:11.0.4'
    compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
    compile 'net.i2p.android.ext:floatingactionbutton:1.10.0'
    compile 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE'
    compile 'org.sufficientlysecure:html-textview:1.3'
    compile 'com.github.mrengineer13:snackbar:1.2.0'
    compile 'com.github.vajro:MaterialDesignLibrary:1.6'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.github.AndroidDeveloperLB:MaterialPreferenceLibrary:5'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.jakewharton:butterknife:8.5.1'
    compile 'com.nbsp:library:1.2'
    compile 'io.ticofab.androidgpxparser:parser:1.0.0'
    compile 'com.annimon:stream:1.1.6'
    compile 'org.greenrobot:eventbus:3.0.0'
    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
    compile 'io.reactivex.rxjava2:rxjava:2.0.1'
    compile 'com.mikepenz:weather-icons-typeface:2.0.10.2@aar'
    compile 'uk.co.samuelwall:material-tap-target-prompt:1.10.0'
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
    compile 'it.sephiroth.android.library.bottomnavigation:bottom-navigation:2.0.1-rc1'
    compile 'com.mikepenz:google-material-typeface:3.0.1.0.original@aar'
    compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.2@aar'
    compile 'com.mikepenz:iconics-core:2.8.6@aar'
    compile 'com.github.florent37:materialtextfield:1.0.7'
    compile 'com.github.gabrielemariotti.cards:cardslib-core:2.1.0'
    compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.1.0'
    compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.1.0'
    compile 'com.google.firebase:firebase-auth:11.0.4'
    compile 'com.google.firebase:firebase-messaging:11.0.4'
    compile 'com.google.firebase:firebase-core:11.0.4'
    compile 'com.google.firebase:firebase-crash:11.0.4'
    compile 'com.google.firebase:firebase-database:11.0.4'
    compile 'com.google.firebase:firebase-storage:11.0.4'
    compile 'com.github.jkwiecien:EasyImage:1.3.1'
    compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
    compile 'com.github.jd-alexander:library:1.1.0'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
    compile('com.crashlytics.sdk.android:crashlytics:2.7.0@aar') {
        transitive = true;
    }
    compile 'com.android.support:design:26.0.0-alpha1'
    compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
    compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
    compile 'com.android.support:support-v4:26.0.0-alpha1'
    compile 'com.android.support:cardview-v7:26.0.0-alpha1'
}

对于compile 'com.android.support.constraint:constraint-layout:1.0.2',我收到以下错误消息:

错误:任务“:app:processDebugManifest”执行失败。
清单合并失败:属性 meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:support-v13:25.3.1] AndroidManifest.xml:27:9-31 也出现在 [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1)。
建议:将 'tools:replace="android:value"' 添加到 AndroidManifest.xml:25:5-27:34 的元素以覆盖。

有什么建议可以解决这个错误吗?

【问题讨论】:

  • 你试过清理项目和重建项目吗?
  • 尝试、清理和重建
  • 发布整个 gradle
  • 一切都围绕着这个库:实现 'com.afollestad.material-dialogs:core:0.9.4.3'。我已经更新到 0.9.4.7 但现在是 26.1.0 和 26.0.1 之间的冲突

标签: android android-manifest manifest-merging


【解决方案1】:

所有 com.android.support 库必须使用完全相同的版本规范

我认为问题在于 com.afollestad.material-dialogs 库,您必须按照此处所述强制库版本

Support Lib Update 25.3.1 Material Dialog

【讨论】:

  • 我解决了。一切都在 afollestad 图书馆附近。我更新为实施 'com.afollestad.material-dialogs:core:0.9.5.0' 和 SDK 到 27。感谢支持。
猜你喜欢
  • 1970-01-01
  • 2021-09-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-01-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多