It's basically in the title, I can't run any instrumented tests in Android library modules that contain Kotlin classes. This is regardless of whether the tests depend on the Kotlin classes.
Here are the simplest steps I could reproduce this issue with:
- Create a new Android library project with default settings
- Just to check, run example instrumented test, runs fine
- Add a Kotlin class
- Run example instrumented test, still runs fine
- Add a new Android library module with all default settings again
- Run example instrumented test, works fine
- Add a Kotlin file, only containing a
class Something -
Attempt to run instrumented test again, now the build fails with the following message:
Error:Execution failed for task ':mylibrary:transformClassesWithDexForDebugAndroidTest'.> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lco/zsmb/example/mylibrary/Something;
Aucun commentaire:
Enregistrer un commentaire