Skip to content

Unable to upgrade to Android 12Β #116

@Diegodotcom

Description

@Diegodotcom

Your Environment

  • Plugin version: 1.4.0
  • Platform: Android

Expected Behavior

The application should run with no problems after updating the compile and target sdk version to 31 (Android 12).

Actual Behavior

The application is having issues during the manifest merger due to the lack of the "android:exported" tags in one of the SDK receivers in the AndroidManifest.

Steps to Reproduce

  1. Load the 1.4.0 plugin in a sample app.
  2. Go to app/build.gradle
  3. Set "compileSdkVersion" to 31
  4. Set "targetSdkVersion" to 31
  5. Run the application.

Debug logs

Build output:
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.
Receiver:
     <receiver android:name="com.transistorsoft.locationmanager.BootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
            </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