Home > Software design >  google playconsole aab file uploading error android exported ="true"
google playconsole aab file uploading error android exported ="true"

Time:03-08

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#expor

My manifest code:

<uses-permission android:name="android.permission.INTERNET" android:exported="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:exported="true"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:exported="true"/>

<application
    android:icon="@mipmap/ic_launcher"
    android:label="DAAPP "
    android:requestLegacyExternalStorage="true"
    
    android:usesCleartextTraffic="true">
    <activity
        android:name=".MainActivity"
        android:exported="true"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:windowSoftInputMode="adjustResize"
        >
        <!-- Specifies an Android theme to apply to this Activity as soon as
             the Android process has started. This theme is visible to the user
             while the Flutter UI initializes. After that, this theme continues
             

             to determine the Window background behind the Flutter UI. -->
        <meta-data
            android:name="io.flutter.embedding.android.NormalTheme"
            android:resource="@style/NormalTheme"
            android:exported="true" />
        <!-- Displays an Android View that continues showing the launch screen
             Drawable until Flutter paints its first frame, then this splash
             screen fades out. A splash screen is useful to avoid any visual
             gap between the end of Android's launch screen and the painting of
             Flutter's first frame. -->
        <meta-data
            android:name="io.flutter.embedding.android.SplashScreenDrawable"
            android:exported="true"
            android:resource="@drawable/launch_background" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN" android:exported="true"/>
            <category android:name="android.intent.category.LAUNCHER"  android:exported="true"/>
        </intent-filter>

    </activity>
    <receiver android:name=".MyBroadcastReceiver"  android:exported="true">
        <intent-filter>
             <action android:name="android.intent.action.BOOT_COMPLETED" />
             <action android:name="android.intent.action.INPUT_METHOD_CHANGED" />
        </intent-filter>
    </receiver>
    <service 
         android:name="com.rmdaapp.RM_DAAPP.backgroundService"
         android:exported="true">
        <intent-filter>
            <action android:name="com.rmdaapp.RM_DAAPP.START_BACKGROUND" />
        </intent-filter>
    </service>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:exported="true"
        android:value="2" />

</application>

CodePudding user response:

You have declared for your manifest file, although its weird it should not show this error if you did not use any third party library which could have services or receivers, Please look into manifest merger, it will be a tile below the manifest file when you open itenter image description here. It will show you the final manifest file which will be included in your apk or aab file.

Side note: You dont need to set exported=true for the meta tags. And try to use work managers to your background work instead of services, they give you a guarantee to execution of your code

CodePudding user response:

This thread is discussing the same issue which you have look at it.

Check this thread

  • Related