我试图按照描述here创建新的基准测试模块,但是我的项目同步失败,并显示以下错误
Detected usage of the testInstrumentationRunner,
androidx.benchmark.AndroidBenchmarkRunner, in project benchmark,
which is no longer valid as it has been moved to
androidx.benchmark.junit4.AndroidBenchmarkRunner.
答案 0 :(得分:1)
更改
testInstrumentationRunner 'androidx.benchmark.AndroidBenchmarkRunner'
到
testInstrumentationRunner 'androidx.benchmark.junit4.AndroidBenchmarkRunner'
在基准模块的gradle文件中解决了该问题。