embedding kawa into android app

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

embedding kawa into android app

Sonny To
Hi,
I want to embed kawa into android app and eval some scheme. I don't want to
write the app in kawa just yet. I'm just experimenting with embedding kawa
first. I was using clojure on android but the clojure runtime is too big
and takes too long to initialize. Kawa seems lean and mean.

I used android studio and used a template helloworld. it compiles and runs
fine. then i added kawa.jar into app/libs directory, recompile and re-ran
it and got this stack trace

  java.lang.RuntimeException: Unable to instantiate activity
  ComponentInfo{datom.world.myapplication/datom.world.myapplication.MainActivity}:
  java.lang.ClassNotFoundException: Didn't find class
  "datom.world.myapplication.MainActivity" on path: DexPathList[[zip file
  "/data/app/datom.world.myapplication-2/base.apk", zip file
  "/data/app/datom.world.myapplication-2/split_lib_dependencies_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_0_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_1_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_2_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_3_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_4_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_5_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_6_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_7_apk.apk", zip
  file "/data/app/datom.world.myapplication-2/split_lib_slice_8_apk.apk", zip
  file
  "/data/app/datom.world.myapplication-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/datom.world.myapplication-2/lib/arm64,
  /system/lib64, /vendor/lib64]]

  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2568)

  at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)

  at android.app.ActivityThread.-wrap12(ActivityThread.java)

  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)

  at android.os.Handler.dispatchMessage(Handler.java:102)

  at android.os.Looper.loop(Looper.java:154)

  at android.app.ActivityThread.main(ActivityThread.java:6121)

  at java.lang.reflect.Method.invoke(Native Method)

  at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)

any insight is greatly appreciated.

thanks,
sonny
Reply | Threaded
Open this post in threaded view
|

Re: embedding kawa into android app

Sonny To
the problem was compiling kawa with jdk1.8. Android doesn't like jdk 1.8

On Sat, Aug 26, 2017 at 3:14 AM, Sonny To <[hidden email]> wrote:

> Hi,
> I want to embed kawa into android app and eval some scheme. I don't want to
> write the app in kawa just yet. I'm just experimenting with embedding kawa
> first. I was using clojure on android but the clojure runtime is too big
> and takes too long to initialize. Kawa seems lean and mean.
>
> I used android studio and used a template helloworld. it compiles and runs
> fine. then i added kawa.jar into app/libs directory, recompile and re-ran
> it and got this stack trace
>
>   java.lang.RuntimeException: Unable to instantiate activity
>   ComponentInfo{datom.world.myapplication/datom.world.myapplication.MainActivity}:
>   java.lang.ClassNotFoundException: Didn't find class
>   "datom.world.myapplication.MainActivity" on path: DexPathList[[zip file
>   "/data/app/datom.world.myapplication-2/base.apk", zip file
>   "/data/app/datom.world.myapplication-2/split_lib_dependencies_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_0_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_1_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_2_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_3_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_4_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_5_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_6_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_7_apk.apk", zip
>   file "/data/app/datom.world.myapplication-2/split_lib_slice_8_apk.apk", zip
>   file
>   "/data/app/datom.world.myapplication-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/datom.world.myapplication-2/lib/arm64,
>   /system/lib64, /vendor/lib64]]
>
>   at
>   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2568)
>
>   at
>   android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
>
>   at android.app.ActivityThread.-wrap12(ActivityThread.java)
>
>   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
>
>   at android.os.Handler.dispatchMessage(Handler.java:102)
>
>   at android.os.Looper.loop(Looper.java:154)
>
>   at android.app.ActivityThread.main(ActivityThread.java:6121)
>
>   at java.lang.reflect.Method.invoke(Native Method)
>
>   at
>   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
>
> any insight is greatly appreciated.
>
> thanks,
> sonny