Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
The workaround I found so far is to use project.afterEvaluate {} to access the build types, as they are created only after Baseline Profile Gradle Plugin creates them:
Kotlin
android {
buildTypes {
release { ... }
project.afterEvaluate {
getByName("benchmarkRelease") { }
getByName("nonMinifiedRelease") { }
}
}
}
Groovy
android {
buildTypes {
release { ... }
project.afterEvaluate {
benchmarkRelease { }
nonMinifiedRelease { }
}
}
}
This way there are no redundant build variants created.
Description
Tests fail with:
com.example.macrobenchmark.FrameTimingBenchmark > start[Pixel 4 XL - 12] FAILED java.lang.RuntimeException: Encountered exception getting gfxinfo. at androidx.benchmark.macro.JankCollectionHelper.getMetrics(JankCollectionHelper.java:227)