You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'an - TagMerge
6You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'anYou uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'an

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'an

Asked 5 months ago
21
6 answers

Accord to google new policy If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. You can follow these steps :

  • open AndroidManifest.xml file and in bottom select Merged Manifest. like this : enter image description here

  • if you not able to preview Merged Manifest then in your build.gradle file set compileSdkVersion 30 and targetSdkVersion 30 and sync your project and now try to open merged manifest again I hope this time you will have proper preview of merged manifest. but if there is no preview don't worry you can still navigate to individual manifest files from different third party libraries you have used in your project.

  • Now check all the activities, services , receiver that uses intent-filter without android:exported tag. In your main manifest file you can simply add android:exported property to activity tag so add android:exported="" and set a boolean value inside these quotation marks. Now you might ask when do I need to add android:exported="true" or android:exported="false" to the activities, services, or broadcast receivers that use intent filters. If the app component includes the LAUNCHER category, set android:exported to true. In most other cases, set android:exported to false.

  • Note : also check individual third party library manifest files if there is any activity , service or receiver using then you have to override same activity , service or receiver in your main manifest file with android:exported property.

For Example in my case I have defined android:exported for each and every activity , service or receiver in my main manifest file but in my project I was using Razorpay dependency so in the manifest of razorpay if found that there is an activity and receiver which are using property without android:exported so I declared them in my main manifest files. as shown below :

 <activity
        android:name="com.razorpay.CheckoutActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:theme="@style/CheckoutTheme"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <data
                android:host="rzp.io"
                android:scheme="io.rzp" />
        </intent-filter>
    </activity>

    <receiver android:name="com.razorpay.RzpTokenReceiver"
        android:exported="true"
        android:permission="android.permission.INTERNET">
        <intent-filter>
            <action android:name="rzp.device_token.share" />
        </intent-filter>
    </receiver>

Note : in your case you may have to go through more files and check activity , services and mention them in your main manifest file.

  • also after doing all this you can changes back to targetSdkVersion 31 and compileSdkVersion 31 in your build.gradle file.

Source: link

9

In my case, I just add this line to my manifest:

android:exported="true"

enter image description here

Source: link

4

I finally fixed this issue

1: install emulator with android v 12

2: run your app the compailer will tell you what service/reciver...etc casued the issue

now you have to add it to your manifist and add the android:exported="true" to it

in my case the prblem was with the local notifcation package i got the message to fix this receiver com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver so i added to my manifist out side the main activity

 <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
 android:exported="true">
       <intent-filter>
           <action android:name="android.intent.action.BOOT_COMPLETED"/>
           <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
       </intent-filter>
   </receiver>

and it worked as intended

Source: link

0

when uploading the file to google play consule App bundles release
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.HatidRider.app"
xmlns:tools="http://schemas.android.com/tools">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="https" />
    </intent>
    <intent>
        <action android:name="android.intent.action.DIAL" />
        <data android:scheme="tel" />
    </intent>
    <intent>
        <action android:name="android.intent.action.SEND" />
        <data android:mimeType="*/*" />
    </intent>
</queries>

<application
    android:name=".App"
    tools:replace="android:label"
    android:label="Hatid-PH Delivery"
    android:requestLegacyExternalStorage="true"
    android:usesCleartextTraffic="true"
    android:icon="@mipmap/ic_launcher">
    <meta-data android:name="com.google.android.geo.API_KEY"
        android:value="AIzaSyCaCSJ0BZItSyXqBv8vpD1N4WBffJeKhLQ"/>

    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        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"
          />
        <!-- 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:resource="@drawable/launch_background"
          />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
        <intent-filter>
            <action android:name="FLUTTER_NOTIFICATION_CLICK" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <service
        android:name="com.HatidRider.app.BackgroundService"
        android:enabled="true"
        android:exported="true" />
    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
</application>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.HatidRider.app"
xmlns:tools="http://schemas.android.com/tools">
<!-- io.flutter.app.FlutterApplication is an 
     android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate 
     method.
 In most cases you can leave this as-is, but you if you want to provide
 additional functionality it is fine to subclass or reimplement
 FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="https" />
    </intent>
    <intent>
        <action android:name="android.intent.action.DIAL" />
        <data android:scheme="tel" />
    </intent>
    <intent>
        <action android:name="android.intent.action.SEND" />
        <data android:mimeType="*/*" />
    </intent>
</queries>

<application
    android:name=".App"
    tools:replace="android:label"
    android:label="Hatid-PH Delivery"
    android:requestLegacyExternalStorage="true"
    android:usesCleartextTraffic="true"
    android:icon="@mipmap/ic_launcher">
    <meta-data android:name="com.google.android.geo.API_KEY"
        android:value="AIzaSyCaCSJ0BZItSyXqBv8vpD1N4WBffJeKhLQ"/>

<activity
    android:name=".MainActivity"
    android:exported="true"
    android:launchMode="singleTop"
    android:theme="@style/LaunchTheme"
    android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
    android:hardwareAccelerated="true"
    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"
      />
    <!-- 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:resource="@drawable/launch_background"
      />
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
    <intent-filter>
        <action android:name="FLUTTER_NOTIFICATION_CLICK" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>
<!-- Don't delete the meta-data below.
     This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<service
    android:name="com.HatidRider.app.BackgroundService"
    android:enabled="true"
    android:exported="true" />
<meta-data
    android:name="flutterEmbedding"
    android:value="2" />

Source: link

0

here is my manifest file.
<application
  android:name=".MainApplication"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  tools:replace="android:allowBackup"
  android:roundIcon="@mipmap/ic_launcher_round"
  android:allowBackup="false"
  android:theme="@style/AppTheme"
  android:resizeableActivity="false">
    <activity
      android:name=".MainActivity"
      android:launchMode="singleTask"
      android:label="@string/app_name"
      android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
      android:windowSoftInputMode="adjustResize"
      android:screenOrientation="portrait"
      android:exported="true">
        <intent-filter>
          <action android:name="android.intent.action.VIEW"/>
          <category android:name="android.intent.category.DEFAULT"/>
          <category android:name="android.intent.category.BROWSABLE"/>
        <data
          android:host="af8c-110-235-232-163.ngrok.io"
          android:scheme="https"/>
        </intent-filter>
    </activity>

       <activity
          android:exported="true"
          android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
          android:theme="@style/SplashTheme"
          android:launchMode="singleTask">
          <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>
        </activity>

  <activity android:exported="true" android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    <meta-data  android:name="com.dieam.reactnativepushnotification.notification_foreground"
                android:value="false"/>
    <receiver android:exported="true" android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
    <receiver android:exported="true" android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
    <receiver android:exported="true" android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
        </intent-filter>
    </receiver>
    <service
        android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
        android:exported="true">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
    <service android:exported="true" android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
</application>

Source: link

0

[Solved] You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the ‘android:exported’ property set April 11, 2022 by Milan Dhameliya
<activity
        android:name="....."
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:theme="@style/CheckoutTheme"
        android:exported="true">  // Just Add This Line

        ...

        ...
    </activity>

Source: link

Recent Questions on android

    Programming Languages