Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 12 Merged Manifest errors fail to be resolve

I have added android:exported="true" to activity with intent in my manifest file as suggested by most solution here. However manifest merger returns the error below:

Error: 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.

And when I compile the project I get the error below;

Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1256332459.tmp/base.apk (at Binary XML file line #132): org.altbeacon.beacon.startup.StartupBroadcastReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'

AndroidManifest.xml is as below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.xxxxxx.android_sample">

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera.ar" />

    <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
        <activity
                android:name=".view.home.MainActivity"
                android:exported="true"
                android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
                android:name=".view.notification_sample.NotificationSampleActivity"
                android:label="@string/title_notification_sample"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.auto_fill_sample.AutoFillSampleActivity"
                android:label="@string/title_auto_fill_sample"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.beacon_android.BeaconAndroidActivity"
                android:label="@string/title_beacon_android"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.beacon_alt.BeaconAltActivity"
                android:label="@string/title_beacon_alt"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.welcome_point.WelcomePointActivity"
                android:label="@string/title_welcome_point"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.stamp_rally.StampRallyActivity"
                android:label="@string/title_stamp_rally"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.sensor_beacon.SensorBeaconActivity"
                android:label="@string/title_sensor_beacon"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.ar.menu.ArMenuActivity"
                android:label="@string/title_ar_menu"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.ar.scene_form.SceneFormActivity"
                android:label="@string/title_scene_form"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.ar.argumented_images.AugmentedImagesActivity"
                android:label="@string/title_scene_form"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.ar.cloud_anchor.CloudAnchorActivity"
                android:label="@string/title_scene_form"
                android:screenOrientation="portrait" />
        <activity
                android:name=".view.splash.SplashActivity"
                android:screenOrientation="portrait"
                android:theme="@style/SplashTheme" />

        <meta-data
                android:name="com.google.ar.core"
                android:value="required" />
        <meta-data
                android:name="com.google.android.ar.API_KEY"
                android:value="xxxxxxxxxx_xxxxxxx_x" />
    </application>

</manifest>

Any help on how to fix this issue is highly appreciated, thank you.

like image 851
braop Avatar asked Sep 21 '25 00:09

braop


1 Answers

Can you update the Android Beacon Library to the latest version (currently it's on version 2.19 based on their releases) since from this commit I understand they have fixed the issue.

Let me know if this helps.

like image 117
hsm59 Avatar answered Sep 22 '25 14:09

hsm59



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!