1

i'm facing with problem when migrate from Android 11 to Android 12

i have change my targetSdkVersion to 31 and add android:exported="true" to AndroidManifest but i'm still get error when build appbundle

/Users/anhdinhhoangquang/mobicloud/android/app/src/main/AndroidManifest.xml:15:9-22:20 Error:
        android:exported needs to be explicitly specified for element <receiver#com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver>. 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.
         *********************************************************
         *********************************************************

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseMainManifest'.
> Manifest merger failed with multiple errors, see logs

* 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.

BUILD FAILED in 6s
Running Gradle task 'bundleRelease'...                              6.9s
Gradle task bundleRelease failed with exit code 1

i've solve problem by the way

<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
            android:exported="true">
</receiver>

my build.grade file

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.mobifone.mobicloud"
        minSdkVersion 21
        targetSdkVersion 31
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

1 Answer 1

0

AndroidManifest.xml edited like this for exported="true";

https://paste2.org/xt7K99ZK

And check build gradle files.

Sign up to request clarification or add additional context in comments.

2 Comments

i have add exported="true" but missing <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true"> </receiver>
after add <receiver> tag i solved this problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.