Issue
I've recently added the Kotlin plugin to my Android application's build and now I want to test a Kotlin class in an InstrumentationTestCase.
IntelliJ/Android Studio sees the class in the editor and it seems the class is compiled when launching the app but when I launch gradlew assembleTest it fails with "cannot find symbol [name of class]".
In my build.gradle I added the kotlin folder as srcDir
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs += 'src/main/kotlin'
}
}
Any advice?
Edit: The issue was a conflict between the Kotlin and Retrolambda plugin and is now resolved.
Solution
I'm from Project Kotlin. Could you answer a few questions to help me reproduce your problem?
Do you run gradlew assembleTest from IDE or from commandline? Do you have kotlin-stdlib in dependencies?
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
Could you provide us your project? I've created an issue in your tracker, so it'll be great to see your answers here http://youtrack.jetbrains.com/issue/KT-6015
Answered By - Natalia Selezneva
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.