【问题标题】:Attribute application@label is also present at属性 application@label 也存在于
【发布时间】:2022-07-03 17:21:01
【问题描述】:

在我的 android 项目中安装新库后,出现以下错误:

/android/app/src/debug/AndroidManifest.xml Error:
    Attribute application@label value=(Compassion) from (unknown)
    is also present at [com.github.master] AndroidManifest.xml:15:9-41 value=(@string/app_name).
    Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:6:4-36:19 to override.

FAILURE: Build failed with an exception.

【问题讨论】:

    标签: android flutter kotlin android-manifest


    【解决方案1】:

    经过一番研究,我发现新安装的库也有一个application@label属性,所以你只需修改你的AndroidManifest.xml文件,添加以下两行代码:

    1. xmlns:tools="http://schemas.android.com/tools" 添加到清单标签
    <manifest
        xmlns:tools="http://schemas.android.com/tools">
    ...
    
    1. 在应用标签中添加tools:replace="android:label"
    ...
       <application
            tools:replace="android:label">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-06-27
      • 2020-11-19
      • 1970-01-01
      • 2021-09-02
      • 2022-08-03
      • 1970-01-01
      • 2015-07-10
      相关资源
      最近更新 更多