添加新的基准测试模块时同步失败

时间:2019-09-25 05:42:16

标签: android benchmarking androidx android-jetpack

我试图按照描述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.

1 个答案:

答案 0 :(得分:1)

更改

testInstrumentationRunner 'androidx.benchmark.AndroidBenchmarkRunner'

testInstrumentationRunner 'androidx.benchmark.junit4.AndroidBenchmarkRunner'

在基准模块的gradle文件中解决了该问题。