在哪里使用Android:导出在Android菜单

anauzrmj  于 2023-03-11  发布在  Android
关注(0)|答案(1)|浏览(113)

当在Play控制台上上传aab文件时,我看到此消息“您上传了一个APK或Android应用包,其中包含带Intent过滤器的活动、活动别名、服务或广播接收器,但没有设置”android:exported“属性。此文件无法安装在Android 12或更高版本上。请参见:developer.android.com/about/versions/12/behavior-changes-12#exported“

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

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:name="freefire.cit.community.MyApplication"
        android:allowBackup="true"
        android:supportsRtl="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:targetApi="m">
        <activity android:name="freefire.cit.community.Privacy_Policy" />
        <activity android:name="freefire.cit.community.AboutActivity" />

        <activity
            android:exported="true"
            android:name="freefire.cit.community.SplashActivity"
            android:theme="@style/AppTheme.NoActionBar2"
            >
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />

                <category android:exported="true"
                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="freefire.cit.community.MainActivity"
            android:configChanges="screenSize|orientation"
            android:theme="@style/AppTheme.NoActionBar" />

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="@string/admob_app_id" />
        <meta-data
            android:name="com.google.android.gms.ads.AD_MANAGER_APP"
            android:value="true" />

        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
    </application>

</manifest>

请检查此菜单文件并帮助我
I want to Fix this error to Upload aab file on Google Play Console.“您上传了一个APK或Android应用捆绑包,其中包含带有Intent过滤器的Activity、Activity别名、服务或广播接收器,但未设置”android:exported“属性。此文件无法安装在Android 12或更高版本上。请参阅:developer.android.com/about/versions/12/behavior-changes-12#exported“

xxslljrj

xxslljrj1#

试试看:

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

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:name="freefire.cit.community.MyApplication"
        android:allowBackup="true"
        android:supportsRtl="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:targetApi="m">
        <activity android:name="freefire.cit.community.Privacy_Policy" 
android:exported="false"/>
        <activity android:name="freefire.cit.community.AboutActivity"
android:exported="false" />

        <activity
            android:exported="true"
            android:name="freefire.cit.community.SplashActivity"
            android:theme="@style/AppTheme.NoActionBar2"
            >
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />

                <category android:exported="true"
                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="freefire.cit.community.MainActivity"
            android:configChanges="screenSize|orientation"
    android:exported="false"
            android:theme="@style/AppTheme.NoActionBar" />

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="@string/admob_app_id" />
        <meta-data
            android:name="com.google.android.gms.ads.AD_MANAGER_APP"
            android:value="true" />

        <activity
            android:name="com.google.android.gms.ads.AdActivity"
    android:exported="false"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
    </application>

</manifest>

相关问题