I have created minimal project based on official tutorial https://kotlinlang.org/docs/reference/mpp-create-lib.html
Gradle build produces .jar file which looks good (stream-api-lib-jvm-1.0-SNAPSHOT.jar)
But when I include this jar (manually) into my Android Studio project, it cannot find the classes (Invalidating cache already tried).
Gradle config changes for adding the lib (into app/libs)
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation files('libs/stream-api-lib-jvm-1.0-SNAPSHOT.jar')
Finally found the reason: in my case kotlin file in library which I tried to access, did not have the "package" directive on top.
1.4m articles
1.4m replys
5 comments
56.9k users