Android Studio 3.0 Canary 1: Kotlin tests or Java tests referring to Kotlin classes fail

Workaround (for now):

Put this into your (app-level) build.gradle:

task copyTestClasses(type: Copy) {
    from "build/tmp/kotlin-classes/debugUnitTest"
    into "build/intermediates/classes/debug"
}

Then modify the test JUnit Run/Debug configuration in the bottom down ‘before launch’, there’s ‘Gradle-aware make’ in it, + another section, select gradle task, select project build.gradle file it is in, and type copyTestClasses. Click here for screenshots of different test framework, but where the plumbing works the same way.

You may need to change/add more directory plumbing depending on your build type. The way you find those odd places is by brute search the project tree for the relevant .class files.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)