You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test manifest additions should include android:exported #896
The AndroidManifest.xml additions included in the test libraries need to include explicit values for "android:exported" or apps targeting 'S' (Android 12) cannot properly run lint/tests.
Steps to Reproduce
Create an empty project in Android Studio (with test dependencies). Change the targetSdkVersion to 'S' and the compileSdkVersion to 'android-S'. On the command line, run ./gradlew lintDebug.
Expected Results
Lint runs
Actual Results
Multiple instance of:
<<project path>>/app/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger17421330438388203262.xml Error:
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.
Reacted by Gesugao-san, Daniel Montoya Ramos, Alexey Korolev, o-hackee, Vlad Borovtsov, Kamil Macek, Alberto Silva, Ben Pyser, Raul Santos, Damai Subimawanto and 5 more
Activity
brettchabot commentedon Mar 11, 2021
This should already be fixed in the latest release.
dd6df4a
Please reopen if there are still issues
TedHopp commentedon Dec 5, 2021
A fix for this problem was described in this comment to a similar issue, based on this StackOverflow answer. Add the following to the module dependencies:
androidTestImplementation "androidx.test.ext:junit:1.1.3"Gesugao-san commentedon Jan 13, 2022
@TedHopp You saved my day!!!
feat: upgrade android.test.ext:junit version to 1.1.3 to fix gradle b…
galacticappster04 commentedon Sep 28, 2022
This is still happening on
Using build:gradle 7.2.2 and compileSdk 32
Someone opened a ticket already here but not sure if this belong here as well:
https://issuetracker.google.com/issues/182098106
The workaround stated there is to redeclare in the main manifest the ff:
Which seem to work in our case. Requesting to reopen this ticket if this issue belongs here.
castroreyrobert commentedon Sep 28, 2022
this also fixed my issue. Thanks
brettchabot commentedon Sep 29, 2022
Can you try androidTestImplementation "androidx.test:core:1.5.0-alpha02". We'll be pushing out a 1.5.0-beta01 shortly hopefully