I have recorded my android app Espresso test using android studio Record Espresso Test option in Run menu. In the end of the record I saved the test with a my own file name.
Once click the save button, IDE automatically created the file in AndroidTest directory of the app module. I right click the saved file and clicked run. Then it prompting me the following error.
/Users/dehanwijesekara/Documents/ProjectName/app/build/intermediates/packaged_manifests/debugAndroidTest/AndroidManifest.xml:24: AAPT: error: attribute android:forceQueryable not found.
following is the file in the above link.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dehan.pizzago.test" >
<uses-sdk
android:minSdkVersion="23"
android:targetSdkVersion="29" />
<instrumentation
android:name="androidx.test.runner.AndroidJUnitRunner"
android:functionalTest="false"
android:handleProfiling="false"
android:label="Tests for com.dehan.pizzago"
android:targetPackage="com.dehan.pizzago" />
<queries>
<package android:name="androidx.test.orchestrator" />
<package android:name="androidx.test.services" />
<package android:name="com.google.android.apps.common.testing.services" />
</queries>
<uses-permission android:name="android.permission.REORDER_TASKS" />
<application
android:debuggable="true"
android:extractNativeLibs="false"
android:forceQueryable="true" >
<uses-library android:name="android.test.runner" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
android:theme="@android:style/Theme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:theme="@android:style/Theme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
android:theme="@android:style/Theme.Dialog" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
I'm using Android Studio 4.1
Please Advice.
androidTestImplementation 'androidx.test:rules:1.3.0-alpha03'
instead ofandroidTestImplementation 'androidx.test:rules:1.3.1-alpha02'
in my build.gradle(app).ActivityTestRule
is deprecated in the newer version. – Bleeding