The issue was caused by 3 activities missing the android:exported
attribute in the androidx.test:core
library version 1.3.0
. Upgrading to version 1.4.0-beta01
fixed the issue.
If you are getting errors after targeting Android 12, the easiest way to debug this is to:
- downgrade to a prior sdk version
- rebuild project
- after a successful build, open your project’s
AndroidManifest.xml
. - at the bottom of the window, click on the
Merged Manifest
tab - look for any
<activity>
that includes an<intent-filter>
tag and is missing theandroid:exported
attribute
If you want to make sure these activities are the issue, add them directly to your project’s AndroidManifest.xml
file with the missing android:exported
attribute added and try rebuilding the project.
So if <activity android:name="com.domain.ProblemActivity">
is missing the android:exported
attribute, add it to your AndroidManifest.xml
file like so:
<activity
android:name="com.domain.ProblemActivity"
android:exported="true" >
Rebuild targeting Android 12 and if it works, then you found the bug!
Thanks @MikePenz for pointing me in the right direction.