[zeromq-dev] Zyre on Android (JNI)

Arnaud Loonstra arnaud at sphaero.org
Tue Jan 5 13:50:01 CET 2016


I have hardly any experience either but I asked a colleague.

We just created a simple app with

     zyre = new Zyre("android_test");
     zyre.start();

in the constructor and

     zyre.stop()

in the destructor.

01-05 13:45:05.769 8364-8364/org.z25.zyretest I/art: Late-enabling 
-Xcheck:jni
01-05 13:45:05.911 8364-8364/org.z25.zyretest D/ZyreTest: 
MainAct.onCreate()
01-05 13:45:05.914 8364-8364/org.z25.zyretest D/AndroidRuntime: 
Shutting down VM
01-05 13:45:05.916 8364-8364/org.z25.zyretest E/AndroidRuntime: FATAL 
EXCEPTION: main
                                                                 
Process: org.z25.zyretest, PID: 8364
                                                                 
java.lang.UnsatisfiedLinkError: dlopen failed: 
"/data/app/org.z25.zyretest-1/lib/arm/libzyrejni.so" is 64-bit instead 
of 32-bit
                                                                     at 
java.lang.Runtime.loadLibrary(Runtime.java:372)
                                                                     at 
java.lang.System.loadLibrary(System.java:1076)
                                                                     at 
org.zeromq.zyre.Zyre.<clinit>(Zyre.java:13)
                                                                     at 
org.z25.zyretest.MainActivity.onCreate(MainActivity.java:23)
                                                                     at 
android.app.Activity.performCreate(Activity.java:6245)
                                                                     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
                                                                     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
                                                                     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
                                                                     at 
android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
                                                                     at 
android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at 
android.os.Looper.loop(Looper.java:148)
                                                                     at 
android.app.ActivityThread.main(ActivityThread.java:5443)
                                                                     at 
java.lang.reflect.Method.invoke(Native Method)
                                                                     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
                                                                     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

The lib you provided is 64bit so it doesn't work on a 32bit device :(

Rg,

Arnaud

On 2016-01-04 12:04, Pieter Hintjens wrote:
> Hi all,
>
> I've been packaging Zyre JNI for Android, and would love if someone
> could test this and let me know how it works. I've not got the skills
> to write even a basic Android app at the moment...
>
> The jar file is here:
> https://github.com/zeromq/zyre/releases/tag/v1.1.0 (rename to .jar
> after downloading).
>
> It contains the Zyre JNI classes plus all native libraries, for ARM.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list