https://kotlinlang.org logo
#android
Title
# android
b

bod

09/23/2016, 8:21 AM
Hi! I’m trying to do some testing in Kotlin / Android. I’ve added this to my gradle file:
Copy code
sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
        test.java.srcDirs += 'src/test/kotlin'
        test.java.srcDirs += 'src/androidTest/kotlin'
    }
and
Copy code
testCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
    androidTestCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    androidTestCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version”
And my test works when I run it within AS. But when I cmd+f9 I get
Unresolved reference: test
on the
import android.support.test.InstrumentationRegistry
line. Any idea?