我尝试使用 Gradle Managed Device 和 Github 操作进行 CI 测试。我做了几次尝试,但大多数时候都遇到了
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.
作为来源,我在我的fork中使用https://github.com/android/testing-samples/tree/main/ui/espresso/ScreenshotSample,它可以在本地正常工作
你在分片吗?如果是,请尝试减少碎片。或者只是 1。
此外,这可能是需要接受的许可证问题。尝试:
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses