Android 12 个合并清单错误无法解决

Android 12 Merged Manifest errors fail to be resolve

我按照此处大多数解决方案的建议,在我的清单文件中添加了 android:exported="true" 到 activity。但是manifest合并returns报错如下:

错误:需要为 明确指定 android:exported。当相应组件定义了 Intent 过滤器时,面向 Android 12 及更高版本的应用需要为 android:exported 指定明确的值。

当我编译项目时,出现以下错误;

错误:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED:installPackageLI 期间解析失败:/data/app/vmdl1256332459.tmp/base.apk(在二进制 XML 文件行 #132): org.altbeacon.beacon.startup.StartupBroadcastReceiver:针对 S+(版本 31 及更高版本)要求在存在 Intent 过滤器时定义 android:exported 的显式值'

AndroidManifest.xml如下:

<?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>

非常感谢任何有关如何解决此问题的帮助,谢谢。

你能将 Android 信标库更新到最新版本吗(目前它是基于他们的 releases) since from this 提交的 2.19 版本我知道他们已经解决了这个问题。

如果有帮助请告诉我。