How to avoid the exported value error in Android 12

190 Views Asked by At

I am seeing the below issue on generating the APK. its strange that the issue is occurring under the androidTest folder. also I have added the tag as android:exported="false" under each activity tag

/Users/userName/projectXYZ/build/intermediates/tmp/manifest/androidTest/qual/debug/tempFile1ProcessTestManifest4615853503946390592.xml:27:9-33:20 Error:

android:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity>. 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.

1

There are 1 best solutions below

0
CommonsWare On

You did not write androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity. That is coming from a library. Make sure you are on an up-to-date version of androidx.test:core, such as:

implementation "androidx.test:core:1.5.0"