I have created a benchmark module and within its build.gradle file I have added a managed device as following:
testOptions {
managedDevices {
devices {
pixel2api30 (com.android.build.api.dsl.ManagedVirtualDevice) {
device = "Pixel 2"
apiLevel = 30
systemImageSource = "aosp"
require64Bit = false
}
}
}
}
Whenever I run the command gradle :benchmark:pixel2api30Setup
its working
But when I run the command gradle :benchmark:pixel2api30BenchmarkAndroidTest
It throws the following error:
Task 'pixel2api30BenchmarkAndroidTest' not found in project ':benchmark'.