简体   繁体   中英

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.

  • What went wrong: Execution failed for task ':app:processDebugMainManifest'.

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" }

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

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:

1.) src/profile/AndroidManifest.xml

2.) src/debug/AndroidManifest.xml

3.) src/main/AdroidManifest.xml

4.)

build.gradle .
defaultConfig {
applicationId

5.) MainActivity.java on "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.

1.) android/app/src/debug/AndroidManifest.xml

2.) android/app/src/main/AndroidManifest.xml

3.) android/app/src/profile/AdroidManifest.xml

4.) buildgradle file defaultConfig {applicationId: ""}

5.) MainActivity.java on "package" OR MainActivity.kotlin

After modifying the above files, the Flutter App run seamlessly any issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM