https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
g

Gunslingor

04/08/2020, 6:24 AM
Trying to make a js/jvm/android/ios multiplatform project, haven't started iOS yet... I had js/jvm working pretty well and understood most of it, I have android sort of working now but holly molly there are 50 milltion tasks now, half of them don't seem to work... how the heck do you build and test this stuff.
a

Alex Pogrebnyak

04/08/2020, 6:31 AM
I can advice to take a look on https://github.com/icerockdev/moko-template as a sample and may be it will be easier to implement js there.
g

Gunslingor

04/08/2020, 7:00 AM
Yeah... looks like similar templates I've seen, little difference... guess I might have to grab a template and merge my stuff into it instead of the other way around, driving me crazy... hate doing things that way. What is the icerockdev package I keep seeing, is that a necessity cause I haven't been using it.
I don't even know how to run this... verification check fails, build fails on Task android appkaptDebugKotlin FAILED... one of a billion tasks running that I dont know much about... the complexity is crazy...
Looks like its mostly run with intelliJs interface at the top
Still hitting issues but workin thru em
a

Alex Pogrebnyak

04/08/2020, 8:10 AM
Actually we use Android Studio and Xcode regulary
g

Gunslingor

04/08/2020, 8:11 AM
was trying to stay within intellij for now
b

basher

04/08/2020, 12:38 PM
Do you have any error output? Happy to help
g

Gunslingor

04/08/2020, 6:35 PM
God the errors have been endless, I haven't been able to make a stable build environment with the simplest of Hello World Android components.
I'll send my project over pm if you want, my main issue is being about to start an android app I guess, just using a tempalte... I have a separate android app I want to move in later but I want to do that separately.
b

basher

04/08/2020, 6:37 PM
ah okay not sure about apps. i've mainly been doing library builds sorry
g

Gunslingor

04/08/2020, 6:41 PM
hmm.... yeah, trying to learn more about that too I guess... multiplatform projects with js/jvm/android/ios/common seem to relly on a shared folder to build a library that then somehow magically gets injected into an ios android app while the js/jvm does its own thing I guess...
Curent error just in case
04/08 14:30:21: Launching 'app' on Nexus 5 API 26.
$ adb shell am start -n "<http://com.newsworthy.app/com.newsworthy.app.MainActivity|com.newsworthy.app/com.newsworthy.app.MainActivity>" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Waiting for process to come online...
Connected to process 12918 on device 'emulator-5554'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: <http://com.newsworthy.app|com.newsworthy.app>, PID: 12918
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{<http://com.newsworthy.app/com.newsworthy.app.MainActivity|com.newsworthy.app/com.newsworthy.app.MainActivity>}: java.lang.ClassNotFoundException: Didn't find class "com.newsworthy.app.MainActivity" on path: DexPathList[[zip file "/data/app/com.newsworthy.app-cl7l-0IuPKGNaBVE_PXx7A==/base.apk"],nativeLibraryDirectories=[/data/app/com.newsworthy.app-cl7l-0IuPKGNaBVE_PXx7A==/lib/x86, /system/lib, /vendor/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2718)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.newsworthy.app.MainActivity" on path: DexPathList[[zip file "/data/app/com.newsworthy.app-cl7l-0IuPKGNaBVE_PXx7A==/base.apk"],nativeLibraryDirectories=[/data/app/com.newsworthy.app-cl7l-0IuPKGNaBVE_PXx7A==/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newActivity(Instrumentation.java:1173)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2708)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
 
at android.app.ActivityThread.-wrap11(Unknown Source:0)
 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
 
at android.os.Handler.dispatchMessage(Handler.java:105)
 
at android.os.Looper.loop(Looper.java:164)
 
at android.app.ActivityThread.main(ActivityThread.java:6541)
 
at java.lang.reflect.Method.invoke(Native Method)
 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
4 Views