I recently updated my projects build.gradle
to target Android SDK 32 with the statements:
compileSdkVersion 32
targetSdkVersion 32
After this process, I am now unable to Rebuild my project and have it run on my mobile device.
The manifest merger process gives this error:
Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for
android:exported
when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
Execution failed for task ':app:processDebugMainManifest'.
After upgrading my Android Studio to Bumblebee, I was able to get a much more descriptive error message that pointed out the missing attributes for the services and activities.
To my surprise, the Activities and Service were from a USSD automation library we use called Hover. I've had to override these and declare them manually in our Manifest to add the missing android:exported
attribute. These are the affected Hover components in the error message:
<service#com.hover.sdk.requests.HoverAccessibilityService>
<activity#com.hover.sdk.api.SessionActivity>
<activity#com.hover.sdk.permissions.PermissionActivity>
These have to be implicitly defined in your Manifest.