I have a simple project that contains two modules within android my app. One is a kotlin module and another an android library. I would like to add the android library as a dependency to the kotlin module. However when I try I get an error Could not resolve project :androidlibrary
.
Is there any way to implement an android library into a kotlin module?
kotlin module Build.gradle
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
dependencies {
implementation(project(":androidlibrary"))
}
android library Build.gradle
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
android {
...
}
dependencies {
...
}