美文网首页
Manifest merger failed with mult

Manifest merger failed with mult

作者: zizi192 | 来源:发表于2021-07-20 17:53 被阅读0次

    今天升级友盟推送库,遇到了一些编译问题,在此做个简单的记录。

    升级厂商通道时,出现了Manifest merger failed with multiple errors, see logs问题,但是console中并无进一步的信息。
    根据stackOverflow中提示,查看Merged Manifest,并未看到error的输出,只有一些warning信息。参考 https://stackoverflow.com/questions/35842955/manifest-merger-failed-with-multiple-errors-in-android-studio

    stackoverflow截图.png

    最终根据错误提示,使用命令 gradlew processDebugManifest --stacktrace打印出具体的报错信息。


    错误信息.png

    可以看到关键错误是huawei-basttb和hms:ui有冲突的内容,其中huawei-basttb是推送库中要删除的旧包。全局搜索后在某个底层包里找到了旧版本华为厂商通道的引用。
    一个不小心,导致折腾了这么久。谨记教训,升级时小步走,慢慢验证,不要急。
    编译错误时,通过命令行,加上--stacktrace是个找到错误日志的好方法。

    与标题不相关的编译问题:

    升级common库到9.4.0时,出现了Could not find common-9.4.0.jar (com.umeng.umsdk:common:9.4.0)的错误。信息如下:

    > Could not find common-9.4.0.jar (com.umeng.umsdk:common:9.4.0). Searched in the following locations: https://maven.aliyun.com/nexus/content/repositories/jcenter/com/umeng/umsdk/common/9.4.0/common-9.4.0.jar Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
    

    尝试取消proxy不能解决。后来查看阿里云的仓库文档,发现其maven库有更新,具体见https://maven.aliyun.com/mvn/guide 。将工程build.gradle中https://maven.aliyun.com/nexus/content/repositories/jcenter等地址升级到最新地址解决。

    参考文档
    AndroidManifest 清单文件合并时出现 【quires a placeholder substitution but no value for <xxx> is provided.】问题
    AndroidManifest清单文件合并失败 Error:Execution...Manifest merger failed with multiple errors, see logs
    Manifest merger failed with multiple errors最终极的解决方式
    https://stackoverflow.com/questions/35842955/manifest-merger-failed-with-multiple-errors-in-android-studio

    相关文章

      网友评论

          本文标题:Manifest merger failed with mult

          本文链接:https://www.haomeiwen.com/subject/hqihmltx.html