flutter - Flutter构建失败错误..androidmanifest没有应用程序标签
问题描述
C:\Users\devis\AndroidStudioProjects\vitality\android\app\src\debug\AndroidManifest.xml:7:9-33 Error:
Attribute application@label value=(vitality) from AndroidManifest.xml:7:9-33
is also present at [io.kommunicate.sdk:kommunicateui:2.1.6] AndroidManifest.xml:14:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:6:5-43:19 to override.
这是错误^^^^
这是我的 androidmanifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="devisuresh.vitality">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
我很困惑在哪里添加什么,因为我没有应用程序标签。
解决方案
您需要在以下层次结构中找到 AndroidManifest 文件
安卓/app/src/main
那么你需要添加tools:replace="android:label
到应用程序标签之间
详细说明 :
<application
android:name="io.flutter.app.FlutterApplication"
android:requestLegacyExternalStorage="true"
android:label="xxxxx"
android:usesCleartextTraffic="true"
tools:replace="android:label" // here it goes
android:icon="@mipmap/ic_launcher">
推荐阅读
- lmdb - 从 Hyperledger Sawtooth 备份 LMDB 数据库
- php - 试图获取非对象的属性“管理员”
- java - 如何检查两个集合是否相等,忽略大小写?
- sql - 使用工作日表的标准 SQL 中两个日期之间的工作日
- c++ - 自定义线程池的性能令人失望
- ios - 无法将具有泛型类型的类添加到 swift 领域
- .net-core - 使用 JWT 令牌从另一个 API 调用 REST API 客户端
- android - Android房间数据库,用id替换元素
- arrays - 比较数字并将它们保存在 Kotlin 中的数组中
- c - C:错误:“格式'%f'需要'double'类型的参数”