-1

PS D:\chat app\chatapp_firebase\chatapp_firebase> flutter run Launching lib\main.dart on CPH2363 in debug mode... Parameter format not correct - D:\chat app\chatapp_firebase\chatapp_firebase\android\app\src\debug\AndroidManifest.xml:15:9-22:20 Error: android:exported needs to be explicitly specified for element <receiver#com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceive r>. 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:processDebugMainManifest'.

Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#com.dexterous.flutterlocalnotifications.ScheduledNoti ficationBootReceiver>. 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.

  • Try:

Run with --stacktrace option to get the stack trace.

BUILD FAILED in 26s Running Gradle task 'assembleDebug'... 27.8s Exception: Gradle task assembleDebug failed with exit code 1

plz help me with what to do

2 Answers2

0

Probably a duplicated question. You can read some possible solutions here.

You can also go to the folder android\app\build.gradle and set the miSdkVersion and the targetSdkVersion to 30.

  defaultConfig {
    ...
    minSdkVersion 30
    targetSdkVersion 30
    ...
Canilho
  • 944
  • 5
  • 11
  • Not the best way to solve the issue – Heshan Sandeepa Aug 17 '23 at 15:46
  • The link I provided has several solutions for the issue, I don't need to copy-paste them all for an upvote. Anyway, the minSDKVersion 30 is a good way to bypass this issue. As long as it is lower than 31, it should work. – Canilho Aug 17 '23 at 15:57
0

The error says

Apps targeting Android 12 and higher are required to specify an explicit value for android:exported

Add the below to your android manifest:

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

The above sets the exported value for the local notification receiver. That should fix it.

Codefarmer
  • 684
  • 4
  • 8