Hi, Multiplatform community. I am Salathiel, an ex...
# multiplatform
s
Hi, Multiplatform community. I am Salathiel, an experienced Dev, Ops but only 1w XP with Kotlin and 1d with Multiplatform. I built a simple ToDo list to validate my understanding and am facing a few challenges: • I built an Android APK using
./gradlew :composeApp:assembleRelease
but the resulting APK couldn't be installed b/c it was invalid • I built a Desktop (Linux) JAR using
./gradlew :composeApp:desktopJar
but I couldn't launch the app using
java -jar path/to/todo-app.jar
(using
javap
to find which of the generated class files could be the main class, I ass
MainKt
to my
java -jar
command but to no avail) • I was not able to find the documentation entry that addresses these build issues • I was not able to find any online documentation that catalogs widgets available (maybe I needed some Android background first?! I dunno) Thanks beforehand.
i
assembleRelease
will only work if you've setup a keystore which is entirely on the android plugin side, not kotlin.
assembleDebug
will create usable apks using a dev keystore
s
Thank you Ian. I actually tried
assembledDebug
(the next best thing) and I had the same behaviour.
Hi. It is me again, with updates... I do not know which of these actions helped but one did (maybe not in this list). From Android Studio (Not IntelliJ Idea which I prefer): • I installed Android SDK Build-tools 35, Android SDK Command-line Tools (latest), CMake, Android API Simulators, Android Emulator • I installed API 34 (done priorly), API 34-ext8, API 34-ext12 (I have no idea what the two others are) Then, from my terminal in project root,
./gradlew :composeApp:assembleDebug
output a working debug APK. For my Desktop build, I found one task that did it: •
./gradlew packageReleaseUberJarForCurrentOs
which gives me a uber JAR • I'm well versed into Java so I went native from that Uber JAR using GraalVM
native-image -jar /path/to/uber.jar
and voila On the UI widgets, I found some entries (although without visual illustrations): • https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-android-only-components.htmlhttps://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-desktop-components.htmlhttps://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-swiftui-integration.htmlhttps://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-uikit-integration.html My next steps will be to publish the app on the Google Play Store (which has always to hardest and unsuccessful step for me 😭). ✌️