我在基准测试模块中创建了一个build.gradle文件,并在其中添加了一个托管设备,如下所示:
testOptions {
managedDevices {
devices {
pixel2api30 (com.android.build.api.dsl.ManagedVirtualDevice) {
device = "Pixel 2"
apiLevel = 30
systemImageSource = "aosp"
require64Bit = false
}
}
}
}
每当运行命令 gradle :benchmark:pixel2api30Setup 时,它都能正常工作。
但当我运行命令 gradle :benchmark:pixel2api30BenchmarkAndroidTest 时,出现了如下错误:
Task 'pixel2api30BenchmarkAndroidTest' not found in project ':benchmark'.