關於安卓編譯錯誤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文件
-
找到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名字不然也會報錯
-
保存重新編譯就👌了