I started off with the tutorial for learning Kotlin in IntelliJ.When I tried running the example i.e
fun main(args: Array) {
prin
My problem was solved by adding kotlin as follow
presentation.gradle (app.gradle)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' // here
apply plugin: 'kotlin-android-extensions' // and here
android {
...
}
dependencies {
...
}
domain.gradle (pure kotlin)
My error was throw here, because Android Studio create my domain module as pure Java Module and applied plugin as java, and I used it in the my presentation module that is a Android/Kotlin Module
The Android Studio finds and import the path of package but the incompatibillity don't allow the build.
Just remove
apply plugin: 'java'and swith to kotlin as follow
apply plugin: 'kotlin' // here is
dependencies {
...
}
...
data.gradle
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' // here
apply plugin: 'kotlin-android-extensions' // and here
android {
...
}
dependencies {
..
}
I think that it will be helpfull