微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Attribute application@label value=(xxx) from AndroidManifest.xml:8:16-37 is also present at [com.git

关于安卓编译错误Attribute application@label value=(xxx) from AndroidManifest.xml:8:16-37 is also present at [com.github.adrielcafe:AndroidAudioConverter:0.0.8] AndroidManifest.xml:11:18-50 value=(@string/app_name).Suggestion: add 'tools:replace="android:label"' to element at AndroidManifest.xml:8:3-29:17 to override.
  • 问题的大概意思是在AndroidManifest.xml文件中application的label需要手动设定并覆盖

  • 在项目文件夹中找到android/app/src/main/AndroidManifest.xml文件

image-20211105154038040

  • 找到application标签,如果没有就在manifest标签下新建一个,如下

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="<package name>">
      <application xmlns:tools="http://schemas.android.com/tools" tools:replace="android:label" android:label="app name" 
        android:icon="@mipmap/launcher_icon">
          </application>
    </manifest>
    
  • 其中android:label是你项目中最终展示的名字,android:icon是图标文件添加的信息为

    xmlns:tools="http://schemas.android.com/tools" 
    tools:replace="android:label" 
    
  • 必须要添加xmlns:tools这一行不然会报错,并且添加过后一定要指定android:label的值作为你的app名字不然也会报错

  • 保存重新编译就

    版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。