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.
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.
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.
For my case:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.***.ecart">
Check your package name in all 3 files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With