Skip to content

Test manifest additions should include android:exported #896

@nic0lette

Description

@nic0lette

Description

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.

AndroidX Test and Android OS Versions

Android version: 12 DP1
AndroidX Test:

testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions