Android Github action with Gradle Managed Device

656 Views Asked by At

I try to make a CI test with Gradle Managed Device and Github action. I made several attempts, but I mostly run into

 Execution failed for task ':app:nexusOneApi30Setup'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.ManagedDeviceSetupTask$ManagedDeviceSetupRunnable
   > java.lang.IllegalStateException: Gradle was not able to complete device setup for: dev30_aosp_atd_x86_Nexus_One
     This could be due to having insufficient resources to provision the number of
     devices requested. Try running the test again and request fewer devices or
     fewer shards.

As source I use https://github.com/android/testing-samples/tree/main/ui/espresso/ScreenshotSample in my fork which works local properly

1

There are 1 best solutions below

0
On

Are you sharding? If yes, try fewer shards. Or just 1.

Also, it could be a license issue that needs to be accepted. Try:

$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager  --licenses