Error when running androidEmptyExample in Android Studio

HI everyone,

I followed the following instructions to setup the Android distribution of openFrameworks in Android Studio https://github.com/openframeworks/openFrameworks/blob/master/docs/android.md

Unfortunately, when trying to get the app running in the simulator I get the following error:

2-27 15:24:01.246    2672-2672/cc.openframeworks.androidEmptyExample E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: cc.openframeworks.androidEmptyExample, PID: 2672
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cc.openframeworks.androidEmptyExample-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.openframeworks.androidEmptyExample-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libOFAndroidApp.so"
            at java.lang.Runtime.loadLibrary(Runtime.java:366)
            at java.lang.System.loadLibrary(System.java:989)
            at cc.openframeworks.OFAndroid.<clinit>(OFAndroid.java:1033)
            at cc.openframeworks.androidEmptyExample.OFActivity.onCreate(OFActivity.java:18)
            at android.app.Activity.performCreate(Activity.java:5933)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

Any tip on how to solve this issue and get the app running would be greatly appreciated.
Thank you!

I have the same issue and followed the same instructions. Did you figure out a solution @paulinhog84?

This link might suggest that we are missing the correct simulator architecture in the shared lib or something … @thedantheman ideas?

I tried a clean / rebuild, but that didn’t seem to help.

Hi @bakercp,

Yes, I got it working.
Make sure the system image for your simulator has armeabi-v7a as ABI. You can edit this in your Android Virtual Device Manager.
At first, I was trying to run the example on a x86 ABI and that was the origin of the error.
I hope this helps.
Please let me know if you need any additional information.

Best,

Paulo

That fixed it! I updated the android doc with some of these tips. Thanks @paulinhog84.

https://github.com/openframeworks/openFrameworks/blob/master/docs/android.md

1 Like

Hello There,

I just got Android studio with OpenFrameworks Master up and running.
I am trying to run the empty example not in the emulator but on my device which is a nexus 9 with android 5.11 and i get the same errors with the unsatisfied link error.

  07-09 12:39:39.188  26211-26211/cc.openframeworks.androidEmptyExample I/art﹕ Late-enabling -Xcheck:jni
07-09 12:39:39.264  26211-26211/cc.openframeworks.androidEmptyExample I/OF﹕ static init
07-09 12:39:39.265  26211-26211/cc.openframeworks.androidEmptyExample I/OF﹕ failed neon detection, loading not-neon library
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cc.openframeworks.androidEmptyExample-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.openframeworks.androidEmptyExample-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libneondetection.so"
            at java.lang.Runtime.loadLibrary(Runtime.java:366)
            at java.lang.System.loadLibrary(System.java:988)
            at cc.openframeworks.OFAndroid.<clinit>(OFAndroid.java:1028)
            at cc.openframeworks.androidEmptyExample.OFActivity.onCreate(OFActivity.java:18)
            at android.app.Activity.performCreate(Activity.java:5990)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
07-09 12:39:39.266  26211-26211/cc.openframeworks.androidEmptyExample D/AndroidRuntime﹕ Shutting down VM
07-09 12:39:39.266  26211-26211/cc.openframeworks.androidEmptyExample E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: cc.openframeworks.androidEmptyExample, PID: 26211
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cc.openframeworks.androidEmptyExample-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.openframeworks.androidEmptyExample-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libOFAndroidApp.so"
            at java.lang.Runtime.loadLibrary(Runtime.java:366)
            at java.lang.System.loadLibrary(System.java:988)
            at cc.openframeworks.OFAndroid.<clinit>(OFAndroid.java:1038)
            at cc.openframeworks.androidEmptyExample.OFActivity.onCreate(OFActivity.java:18)
            at android.app.Activity.performCreate(Activity.java:5990)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Since I cannot change the system image, because it is a live device I am a bit lost as what to do…
Can anybody give me a push in the right direction ?

Thanks in advance!

1 Like