-1

Getting an error on uploading an app to the Google Play store

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

All activities, activity alias, services, or broadcast receivers that have intent-filter are marked with android:exported.

The app installs to device and emulator running Android 12 without errors. Also, Android Studio doesn't report any error on merged AndroidManifest file.

Any ideas what could be wrong when there are no errors on the development environment but Google Play store still complains? How this can be resolved?

Robertas Setkus
  • 3,075
  • 6
  • 31
  • 54

2 Answers2

1

I think mentioned link in your question answers itself.

In simple words, if your app is responding to system or by other apps and if that is intended then you need set android:exported=true else false. I mean if your app activity gets opened by any other app or your app listens to other apps broadcasts or your app starts any service by other apps then this case is involved.

Doing this will resolve your issue on play store while publishing app. This assessment is done as part of behaviour changes when targeting android 12

https://developer.android.com/about/versions/12/behavior-changes-12#exported

Update : Add below tag in all your activities, services, broadcasts etc. android:exported="false/true" based on above explanation.

E.g.

<service android:name="com.example.app.backgroundService"
         android:exported="false">
    <intent-filter>
        <action android:name="com.example.app.START_BACKGROUND" />
    </intent-filter>
</service>
VVB
  • 7,363
  • 7
  • 49
  • 83
  • All activities, activity alias, services or broadcast receivers which have intent-filter are marked with android:exported. You would error on merged AndroidManifest otherwise. – Robertas Setkus Jul 11 '22 at 10:08
0

Dexguard can be the cause of this issue. Add rule -keepresourcexmlattributenames manifest/** to your Dexguard/Proguard file.

The original answer found https://stackoverflow.com/a/70703375/1474153

Robertas Setkus
  • 3,075
  • 6
  • 31
  • 54