jacksonfdam
07/28/2022, 2:48 PMjava.lang.NoClassDefFoundError: Failed resolution of: Landroidx/test/platform/graphics/HardwareRendererCompat;
at androidx.compose.ui.test.android.WindowCapture_androidKt.withDrawingEnabled(WindowCapture.android.kt:55)
at androidx.compose.ui.test.android.WindowCapture_androidKt.captureRegionToImage(WindowCapture.android.kt:46)
at androidx.compose.ui.test.AndroidImageHelpers_androidKt.processSingleWindowScreenshot(AndroidImageHelpers.android.kt:138)
at androidx.compose.ui.test.AndroidImageHelpers_androidKt.captureToImage(AndroidImageHelpers.android.kt:75)
at androidx.compose.ui.test.AndroidImageHelpers_androidKt.captureToImage(AndroidImageHelpers.android.kt:50)
and...
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.test.platform.graphics.HardwareRendererCompat" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/android.test.base.jar",
Everything that invokes the captureToImage
crashes
fun SemanticsNodeInteraction.assertBackgroundColor2(color: Color) {
val capturedName = captureToImage().colorSpace.name
assertEquals(color.colorSpace.name, capturedName)
}
I'm using Kotlin 1.6.21 with the latest stable versions of the following libs
androidTestImplementation TestDependencies.composeTooling
androidTestImplementation Compose.test
androidTestImplementation Compose.uiTest
androidTestImplementation TestDependencies.hamcrest
androidTestImplementation TestDependencies.espressoCore
androidTestImplementation TestDependencies.espressoContrib
androidTestImplementation TestDependencies.archCore
androidTestImplementation TestDependencies.coreTest
androidTestImplementation TestDependencies.truth
androidTestImplementation TestDependencies.androidJunit
androidTestImplementation TestDependencies.androidJunitKtx
androidTestImplementation TestDependencies.androidxTestOrchestrator
androidTestImplementation TestDependencies.androidxTestRunner
androidTestImplementation TestDependencies.androidxTestRules
androidTestImplementation TestDependencies.androidxTestMonitor
androidTestUtil TestDependencies.androidxTestOrchestrator
Maybe I missed something.. or not... any suggestions?