gaetan
02/20/2018, 11:41 PMdavid.bilik
02/22/2018, 2:37 PMneworldlt
02/22/2018, 3:19 PMdavid.bilik
02/23/2018, 9:16 AMcommon
, common-android
and app
modules .. in common-android
i have expectedBy project(":common")
. And If I have in app
module implementation project (':common')
IDE can see the classes from common
module, but when i ran the app, it fails that there are Unresolved references to those class .. however if i switch to implementation project (':common-android')
in the app
module, IDE cant see the classes, but build works..am i missing something?neworldlt
02/25/2018, 2:08 PM(root) - setup only buildscript classpath
- engine-common -> kotlin-platform-common
- engine-js -> kotlin-platform-js
- engine-jvm -> kotlin-platform-jvm
- backend -> kotlin-jvm
- engine-jvm
- frontend -> kotlin-js
- engine-js
gildor
02/26/2018, 1:20 AMkotlin-platform-jvm
project to implement JVM APIs and then use it as dependency of your Android project
Check this issue:
https://youtrack.jetbrains.com/issue/KT-18462
kotlin-platform-android will be available on 1.2.30spierce7
02/26/2018, 4:24 AMalbertgao
02/28/2018, 9:48 AMcommon
module: Only contain expect class
and no implementation just like plain interface
. Build with plugin kotlin-platform-common
- `😛latforms:jvm`: actual implementation on jvm. It generates library, and I tried in Android Studio, it works. Build with plugin kotlin-platform-jvm
project-lib:
- `common`: It contains code which mean to be the same across all platforms. But it depends on the API from common
of project-platforms
. Which means it just depends on the common
code rather than the actual implementation of a certain platform. Build with plugin kotlin-platform-common
- `forBuild:JVM`: Its purpose is for testing common
and build for jvm. So it just embed the source code from common
, and add the generated jar file from project-platforms :platforms:jvm
as dependencies and do the test and build. The testing part works, it will compile and run the test from common
. And build without error.
Now the problem is when use the generated jar file from forBuild:JVM
in Android studio. It said: java.lang.NoClassDefFoundError: Failed resolution of: Lnz/salect/kotlinidiom/Platform; Caused by: java.lang.ClassNotFoundException: Didn't find class "nz.salect.kotlinidiom.Platform" on path: DexPathList[[zip file "/data/app/nz.salect.handset-1/base.apk", zip file "/data/app/nz.salect.handset-1/split_lib_dependencies_apk.apk"],nativeLibraryDirectories=[/data/app/nz.salect.handset-1/lib/x86, /system/lib, /vendor/lib]]
And the Platform
class is from project-platforms
which already add its jar file as dependencies.
I tried built with either kotlin-platform-jvm
or org.jetbrains.kotlin.jvm
, both yield the same error.
What am I missing here?jw
03/02/2018, 9:33 PMqlitzler
03/03/2018, 1:48 PMimlement project
common-jvm
and common-client-jvm
in the android module, to reference classes from common
.. seems obvious nowbenleggiero
03/04/2018, 1:36 AMalbertgao
03/05/2018, 5:37 AMkotlin-platform-android
works well for multiplatform project
, and can generate the aar and jar file without errors. But the android
is displayed as red and Unresolved reference: android
in IDEA, how to make it right?qlitzler
03/06/2018, 10:03 AMgildor
03/08/2018, 1:39 AMbuild.doLast
task? Looks suspiciousmegamiun
03/08/2018, 5:16 AMniklas
03/08/2018, 9:34 AMrobstoll
03/12/2018, 3:21 PMError:(3, 1) Kotlin: The feature "multi platform projects" is experimental and should be enabled explicitly
Anybody had the same experience and can give me a pointer?natpryce
03/13/2018, 7:34 AMnatpryce
03/13/2018, 7:38 AMnatpryce
03/13/2018, 7:41 AMnatpryce
03/13/2018, 6:46 PMkrtko
03/15/2018, 11:31 PMexpect class Json {
fun getInt(id: String): Int
But with JS, the native Json class is only an interface so implementing it like:
actual class Json: kotlin.js.Json {
actual fun getInt(id: String): Int {
return this[id] as? Int ?: 0
}
Does not work. Any suggestions?krtko
03/16/2018, 11:48 PMdamian
03/18/2018, 3:42 PMrobstoll
03/21/2018, 9:57 AMrobstoll
03/21/2018, 10:00 AMunresolved reference: JvmName
. Should I fill a bug or is this already common knowledge?Nail Gilaziev
03/21/2018, 10:35 AMyusuf3000
03/22/2018, 11:17 AMalbertgao
03/22/2018, 8:34 PMcommon
?brabo-hi
03/23/2018, 4:31 AMbrabo-hi
03/23/2018, 4:31 AMelect
03/23/2018, 6:58 AMniklas
03/23/2018, 8:30 AMSimone Civetta
03/23/2018, 9:27 AMalbertgao
03/23/2018, 10:27 AM