1

Issue : 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. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported

When I loaded my aab file to google play I got this error. I understood it, but when I changed my manifest files (C:\android\App\Assets\Plugins\Android\AndroidManifest.xml and C:\android\App\Assets\Plugins\Android\OneSignalConfig.plugin\AndroidManifest.xml) I got same error.

It happened, because OneSignal has additional lines, when I don't see in C:\android\App\Assets\Plugins\Android\OneSignalConfig.plugin\AndroidManifest.xml file. Also I can't modified final AndroidManifest.xml file, because Unity starts auto-assembly of the application.

How can I solve my problem?

Alex
  • 1,407
  • 2
  • 10
  • 19

1 Answers1

1

I found solution for it, but it's not right, because you can change AndroidManifest.xml files other libs. But, if you don't have any solution you can use this.

Yes, you can cahnge your Target API level to 30 API, but after november 2022 your apps will be hidden from the store and I think, it's not solution for this trable (more)

  1. Go to {YOUR_UNITY_PROJECT}\Assets\Plugins\Android\ and open AndroidManifest.xml file and added android:expodted="true" (more)
  2. Open all dirs and check other AndroidManifest.xml files. If activities, receivers, services without android:exported tag - add it.
  3. Save all changed
  4. Start build your app
  5. Go to {YOUR_UNITY_PROJECT}\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release and open AndroidManifest.xml
  6. Find all activities, receivers, services without android:exported tag. If you don't have this items - you can load your file to google play. If you have - go to step 7.
  7. Go to C:\Users{YOUR_USER}.gradle\caches\ and search required libraries.
  8. Open libs and change AndroidManifest.xml files (add android:exported tag with false or true). I added false value (android:exported="false")
  9. Save all changed and go to step 4.

For example: I have oneSignal lib, and I have some services without exproted tag. I founded this lib (C:\Users\AGENTxXx.gradle\caches\transforms-3\98a2faf5d9f43588b86ab05e1221a233\transformed\jetified-onesignal-unity), changed AndroidManifest.xml and build my aab file again.

Alex
  • 1,407
  • 2
  • 10
  • 19