'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.'

Hi there. I’m working on an update to an already-published app on the Google Play Store.
After working on my game for a while, I uploaded my .aab build to Google Play Internal Testing, only to have my file rejected by an error saying I didn’t set any android:exported properties.

Can anyone help me with this? I think it’s an issue with my manifest.xml, but I’m not even certain about that. Even advice on how to start troubleshooting would be awesome!

I’ve uploaded many builds to Google Play, even ones with more features than this, and this is the first time I’ve gotten this error.

Thanks!

Platform: Android
Unity Version: 2020.3.16f1
Features in my game that may effect this(?): Unity Analytics, Google Play Games Achievements, Leaderboards, and Save Game, Google AdMob, and a plugin called “EasyMobile” from the Unity Asset Store

Full error (as seen in screenshot below):
“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: Behavior changes: Apps targeting Android 12  |  Android Developers

@kingzustin I build my game using Unity 2020.3.24.f1 I got same error when i was uploading my game to play store so i search online and found out that you have to made the following changes to your app in unity if you want to build for android 12.

Project Settings > Player > Android > Publishing Settings > Build, select Custom Main Manifest.
Apply the following changes to Assets/Plugins/Android/AndroidManifest.xml:

If present, remove the following comment at the top of the file:

Add the android:exported attribute to the tag:

 <activity android:name="com.unity3d.player.UnityPlayerActivity"
           android:theme="@style/UnityThemeSelector"
           android:exported="true">
     <intent-filter>
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
     </intent-filter>
     <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
 </activity>

Source: Mit Unity für Android 12 entwickeln  |  ARCore  |  Google for Developers

Unfortunately solution did not work out for me. So i simply download a newer version Unity 2020.3.25.f1 of unity and there was no error in uploading my game to google play store. It looked like they have fixed that issue in newer version of unity. I hope this will help you resolve your issue.

Best regards
Limitless Games
Pamir Khan

Hi all! I also encountered the problem described above. All the solutions that I saw in the discussions of this problem did not help me. The source of the problem was the Unity Mobile Notifications plugin.
I was helped by updating this plugin to the latest version. If the source of your problem is the same as mine, go to the Package Manager, find this plugin and update. Do the build itself NOT with a custom manifest.

Good luck and I hope my advice helps someone! :slight_smile:

Note: my version of Unity is 2021.2.5f1

Same problem.

Most likely the issue is not having exported flag for the unity activity which is a requirement from Android 12. This can be solved by updating your unity to latest version.

BUT,

If you can’t update or if unity hasn’t back-ported to your LTS version, you can try the script listed here.

Note that this is picked from our plugin Cross Platform Native Plugins : Essential Kit and adapted to avoid any compilation errors for other who don’t have the plugin. So, if you already have this plugin, nothing to add.

How to use?

 1. Copy the below script and place it in any Editor folder
 2. Make apk/aab and upload

Adding android:export in my AndroidManifest doesn’t work but I’ve found another solution for the moment.

In PlayerSettings → Others I’ve changed Target API level from ‘Automatic(highest installed)’ to Android 11 ( API level 30 ) .
If you do not have API 30 installed, use Android Studio → Tools → SDK Manager and install it.

If an error still appear when you want to build, go to C: → Users → YourUser → AppData → Local → Android → SDK → Platforms and select ‘android-30’ folder.
Copy that folder to C:\Program Files\Unity\Hub\Editor\2021.1.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms

Restart unity and try to build again.

I know this is not a good solution for building for Android 12 but I’m using it to build just for other versions for the moment.

Cheers!

This worked for me:

-Updated the unity version from 2019.4.21 to 2020.3.19.
Then follow Project Settings > Player > Android > Publishing Settings > Build, select Custom Main Manifest
-Added android:exported attribute to the activity tag in Main Manifest

Resolve Dependencies and build, after that I was able to update my game on playstore.

Problem Fixed here : https://forum.unity.com/threads/not-able-to-publish-on-google-play-android-exported-android-12.1224948/#post-7846305

No Need to update unity version for target sdk 32.

Try this, It works for me

this worked for me