[英]AndroidManifest.xml error, how can I solve this problem?
Overlay manifest:package attribute declared at AndroidManifest.xml:2:5-37 value=(com.app.app)
has a different value=(com.app.app) declared in main manifest at AndroidManifest.xml:2:5-34
Suggestion: remove the overlay declaration at AndroidManifest.xml and place it in the build.gradle:
flavorName {
applicationId = "com.app.app"
}
FAILURE: Build failed with an exception. FAILURE:构建失败并出现异常。
Manifest merger failed: Overlay manifest:package attribute declared at AndroidManifest.xml:2:5-37 value=(com.app.app) has a different value=(com.app.app) declared in main manifest at AndroidManifest.xml:2:5-34 Suggestion: remove the overlay declaration at AndroidManifest.xml and place it in the build.gradle: flavorName { applicationId = "com.app.app" } Manifest merger failed: Overlay manifest:package attribute declared at AndroidManifest.xml:2:5-37 value=(com.app.app) has a different value=(com.app.app) declared in main manifest at AndroidManifest.xml: 2:5-34 建议:去掉 AndroidManifest.xml 的覆盖声明,放到 build.gradle: flavorName { applicationId = "com.app.app" }
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志 output。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获得更多帮助
BUILD FAILED in 4m 44s Exception: Gradle task assembleDebug failed with exit code 1 BUILD FAILED in 4m 44s Exception: Gradle task assembleDebug failed with exit code 1
How i can fix this problem?我该如何解决这个问题?
Try to search them and change your package name in the following locations:尝试搜索它们并在以下位置更改您的 package 名称:
1.) src/profile/AndroidManifest.xml
1.) src/profile/AndroidManifest.xml
2.) src/debug/AndroidManifest.xml
2.) src/debug/AndroidManifest.xml
3.) src/main/AdroidManifest.xml
3.) src/main/AdroidManifest.xml
4.) 4.)
build.gradle .
defaultConfig {
applicationId
5.) MainActivity.java
on "package"
5.) MainActivity.java
在"package"
上
If you want to know exactly how to achieve that, take a look at this page for further support.如果您想确切地知道如何实现这一点,请查看此页面以获得进一步的支持。
The best solution to this is by changing the package name in all these 5 files.最好的解决方案是更改所有这 5 个文件中的 package 名称。
1.) android/app/src/debug/AndroidManifest.xml 1.) android/app/src/debug/AndroidManifest.xml
2.) android/app/src/main/AndroidManifest.xml 2.) android/app/src/main/AndroidManifest.xml
3.) android/app/src/profile/AdroidManifest.xml 3.) android/app/src/profile/AdroidManifest.xml
4.) buildgradle file defaultConfig {applicationId: ""} 4.) buildgradle 文件 defaultConfig {applicationId: ""}
5.) MainActivity.java on "package" OR MainActivity.kotlin 5.) MainActivity.java on "package" OR MainActivity.kotlin
After modifying the above files, the Flutter App run seamlessly any issues.修改上述文件后,Flutter App 可以无缝运行任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.