Skip to content

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. #528

@aatikakhan

Description

@aatikakhan

Launching lib/main.dart on sdk gphone x86 in debug mode... /Users/aatikakhan/EYL/newclone/clone/knight-app/android/app/src/main/AndroidManifest.xml Error: 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.

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 . 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. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
`

getting this issue after latest update while using alarm manager.
Flutter doctor summary is here:

`[✓] Flutter (Channel master, 2.6.0-12.0.pre.238, on macOS 11.6 20G165 darwin-x64, locale
en-IN)
• Flutter version 2.6.0-12.0.pre.238 at /Users/aatikakhan/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision bf429f2771 (6 hours ago), 2021-10-06 21:44:27 -0700
• Engine revision e914da14f1
• Dart version 2.15.0 (build 2.15.0-178.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/aatikakhan/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.10.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.60.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.27.0

[✓] Connected device (2 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30)
(emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.71

• No issues found!`

And here is AndroidManifest.xml file:

`  <service
            android:name="dev.fluttercommunity.plus.androidalarmmanager.AlarmService"
            android:permission="android.permission.BIND_JOB_SERVICE"
            android:exported="false"/>
        <receiver
            android:name="dev.fluttercommunity.plus.androidalarmmanager.AlarmBroadcastReceiver"
            android:exported="false"/>
        <receiver
            android:name="dev.fluttercommunity.plus.androidalarmmanager.RebootBroadcastReceiver"
            android:enabled="false"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"></action>
            </intent-filter>
        </receiver>`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions