Can anyone help me understand why I can’t seem to ...
# konsist
t
Can anyone help me understand why I can’t seem to run tests directly from Android Studio?
image.png
Copy code
Exception in thread "DefaultDispatcher-worker-7 @coroutine#2" java.lang.NoClassDefFoundError: Could not initialize class com.lemonappdev.konsist.core.util.KotlinFileParser
	at com.lemonappdev.konsist.core.ext.FileExtKt.toKoFile(FileExt.kt:12)
	at com.lemonappdev.konsist.core.provider.util.KoFileDeclarationProvider.parseKotlinFile(KoFileDeclarationProvider.kt:87)
	at com.lemonappdev.konsist.core.provider.util.KoFileDeclarationProvider.access$parseKotlinFile(KoFileDeclarationProvider.kt:20)
	at com.lemonappdev.konsist.core.provider.util.KoFileDeclarationProvider$getKoFileDeclarations$2$currentDeferred$1$1$2$1.invokeSuspend(KoFileDeclarationProvider.kt:70)
	(Coroutine boundary)
	at com.lemonappdev.konsist.core.provider.util.KoFileDeclarationProvider$getKoFileDeclarations$2.invokeSuspend(KoFileDeclarationProvider.kt:77)
	at com.lemonappdev.konsist.core.provider.util.KoFileDeclarationProvider$3$1.invokeSuspend(KoFileDeclarationProvider.kt:35)
	at com.lemonappdev.konsist.core.provider.util.KoFileDeclarationProvider$3.invokeSuspend(KoFileDeclarationProvider.kt:34)
	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineId(2), "coroutine#2":StandaloneCoroutine{Cancelling}@1ef458e6, Dispatchers.Default]
If I run tests from commandline, it seems to work OK
This is what the test configuration looks like (auto generated by Android Studio)
i
Can you try one of the sample Android project to see if this works for you? https://github.com/LemonAppDev/konsist/tree/main/samples/starter-projects