Android Gradle Managed Devices fails to boot emulator

344 Views Asked by At

When I try running 3 shards of a Pixel 4 API 31 image for Android Emulators, I am getting

Device provider <com.android.tools.utp.plugins.deviceprovider.gradle.GradleManagedAndroidDeviceProvider> failed trying to provide device controller.
Gradle was unable to boot one or more devices. If this issue persists,
delete existing devices using the "cleanManagedDevices" task and rerun
the test.
com.android.tools.utp.plugins.deviceprovider.gradle.GradleManagedAndroidDeviceLauncher$EmulatorTimeoutException: Gradle was unable to boot one or more devices. If this issue persists,
delete existing devices using the "cleanManagedDevices" task and rerun
the test.

I am running it by using ./gradlew pixel4api31DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=aaa.bbb.ccc.ddd.Suites.CITestSuitePartA -Pandroid.experimental.androidTest.numManagedDeviceShards=3

Using 2 shards works, but using 3 fails with this error. Does this mean that there aren't enough resources on my mac to be able to run 3 API 31 emulators? API 30 works with 3.

I tried with a mac having 16 GB ram (M1) and another with 32 GB (M2).

0

There are 0 best solutions below