Closed iparry7979 closed 2 years ago
It said limitedParallelism
is not in kotlinx/coroutines/CoroutineDispatcher
dependency.
[debug] [Espresso] java.lang.NoSuchMethodError: No virtual method limitedParallelism(I)Lkotlinx/coroutines/CoroutineDispatcher; in class Lkotlinx/coroutines/CoroutineDispatcher; or its super classes (declaration of 'kotlinx.coroutines.CoroutineDispatcher' appears in /data/app/~~XucXUhg7Bzv29ZkXSLRTjg==/io.appium.espressoserver.test-_DuJNVhx4wYAXFyZJ1e-cA==/base.apk!classes13.dex)
What about coordinating the dependencies of the kotlin coroutine? Probably the coroutine module (or part of it?) was lost in Android Instrumentation build. (androidTestImplementation dependency one)
Thankyou. This worked when I added "additionalAppDependencies": ["org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1"]
to the espressoBuildConfig capability.
Is it always necessary to explicitly define each additional dependency that the app under test uses?
Not everything, but yes, to include them as AndroidTest build. It is Espresso/instrumentation framework stuff.
I’m experiencing an app crash with the espresso driver that does not occur when running the app under normal conditions. The error is as follows:
I was originally running the espresso driver with the following esspressoBuildConfig:
{"toolsVersions": {"composeVersion": "1.1.1", "compileSdk":"31", "kotlin":"1.6.10"}}
My initial thought was that it was a version incompatibility. I checked with my app developer and he said we were using kotlin version 1.5.30 and compose version 1.1.0 so I rebuilt the espresso driver with the downgraded versions but still got the same error.
Please let me know if more info is required.