Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter showed Android manifest error "Overlay manifest"

When I try to follow the flutter tutorial here.

https://codelabs.developers.google.com/codelabs/mdc-101-flutter/#2 and run the main.dart

I got the following gradle error in the terminal

/${user}/Documents/material-components-flutter-codelabs/mdc_100_series/android/app/src/debug/AndroidManifest.xml Error: Overlay manifest:package attribute declared at AndroidManifest.xml:2:5-41 value=(com.example.mdc_100_series) has a different value=(com.example.mdc100series) declared in main manifest at AndroidManifest.xml:2:5-39 Suggestion: remove the overlay declaration at AndroidManifest.xml and place it in the build.gradle: flavorName { applicationId = "com.example.mdc_100_series" }

I cant figure out what the problem is behind it.

like image 658
Long Ranger Avatar asked Mar 02 '19 03:03

Long Ranger


Video Answer


2 Answers

Had the same problem, for me the package name in the faulty AndroidManifests (./android/app/debug & /profile) was written with underscores ("com.example.mdc_100_series" instead of "com.example.mdc100series"). Removing those underscores resolved the problem.

like image 191
Jefski14 Avatar answered Oct 18 '22 21:10

Jefski14


Just see your file structure. you should have 3 manifest(debug, main, profile) file. Package name should be same for all this files. Then your error will be solved.

enter image description here

For my case:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.***.ecart">

Check your package name in all 3 files.

like image 3
Shihab Uddin Avatar answered Oct 18 '22 21:10

Shihab Uddin