我已经创建了一个基准测试模块,并在其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'.