Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 494
Caíque Silva Avatar asked Mar 10 '26 17:03

Caíque Silva


2 Answers

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.

like image 196
Etienne Kaiser Avatar answered Mar 13 '26 07:03

Etienne Kaiser


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.

like image 25
Salami Tobi Avatar answered Mar 13 '26 06:03

Salami Tobi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!