I am trying to use coroutines in some espresso tes...
# test
b
I am trying to use coroutines in some espresso test code, but am getting
NoSuchMethodError
.
Copy code
java.lang.NoSuchMethodError: No static method runBlocking$default(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Ljava/lang/Object; in class Lkotlinx/coroutines/BuildersKt; or its super classes (declaration of 'kotlinx.coroutines.BuildersKt' appears in /data/app/build-acBhKAw8srVGmPVxba9HCw==/base.apk!classes2.dex)
I have defined rules for
testProguardFiles
to do nothing and I have redeclared the coroutines dependency with
androidTestImplementation
. Is there a way to force the test code to use a separate classpath for coroutines? Or what's the recommended way to resolve?
ahh, it was minifyEnabled that was removing those functions, switching minifyEnabled to false resolves the issue
ah nvm I thought r8 and minifyEnabled were separate tools, minifyEnabled IS enabling the r8 shrinker 🤔