Right now I am trying to build my appbundle in flutter using the following command:
flutter build appbundle --release
and receive the following error:
Manifest merger failed : android:exported needs to be explicitly specified for <receiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
I have run with stack trace, info and debug and nothing useful comes out of it.
and after trying many solutions, mostly removing packages or manually adding android:export="true", any push in the right direction would be greatly appreciated.
I tried to run flutter build appbundle and expected an app bundle file to be generated. This works for sdk version 30 and target version 30, but at 31 I get the error previously stated.
2
Answers
I noticed that the problem was due to the fact I did not have this receiver
There was no receiver set for this specific package in the AndroidManifest.xml file
You need to add
in
./android/app/src/main/AndroidManifest.xml
in activity section near
it will look like this