No tasks available when trying to run androidTest in Android Studio

I created a sample KMM application in Android Studio.

I can run all tests using the check task, but I cannot run individual tests inside androidTest. Whenever I click on the icon next to each test, I get the “No tasks available” error.

Now, I know that in IntelliJ this issue can be resolved by changing the “Run tests using” option in Gradle Preferences. However, Android Studio does not have this option available.

How can I run individual android tests using Android Studio?