Android Studio doesn't build androidEmptyExample

Hi there,

After following the instructions for Android Studio as close as I could, the empty example doesn’t build and I get this for my logcat:

05-26 19:03:58.419 8785-8793/cc.openframeworks.androidEmptyExample I/System: FinalizerDaemon: finalize objects = 1314
05-26 19:03:58.429 8785-8785/cc.openframeworks.androidEmptyExample W/System: ClassLoader referenced unknown path: /data/app/cc.openframeworks.androidEmptyExample-2/lib/arm64
05-26 19:03:58.490 8785-8785/cc.openframeworks.androidEmptyExample W/System: ClassLoader referenced unknown path: /data/app/cc.openframeworks.androidEmptyExample-2/lib/arm64
05-26 19:03:58.500 8785-8785/cc.openframeworks.androidEmptyExample D/ActivityThread: BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{8b16f0d cc.openframeworks.androidEmptyExample}}
05-26 19:03:58.500 8785-8785/cc.openframeworks.androidEmptyExample V/ActivityThread: Handling launch of ActivityRecord{4706ec2 token=android.os.BinderProxy@1aa74d3 {cc.openframeworks.androidEmptyExample/cc.openframeworks.androidEmptyExample.OFActivity}} startsNotResumed=false
05-26 19:03:58.524 8785-8785/cc.openframeworks.androidEmptyExample V/ActivityThread: ActivityRecord{4706ec2 token=android.os.BinderProxy@1aa74d3 {cc.openframeworks.androidEmptyExample/cc.openframeworks.androidEmptyExample.OFActivity}}: app=android.app.Application@92ef09, appName=cc.openframeworks.androidEmptyExample, pkg=cc.openframeworks.androidEmptyExample, comp={cc.openframeworks.androidEmptyExample/cc.openframeworks.androidEmptyExample.OFActivity}, dir=/data/app/cc.openframeworks.androidEmptyExample-2/base.apk
05-26 19:03:58.543 8785-8785/cc.openframeworks.androidEmptyExample I/OF: static init
05-26 19:03:58.543 8785-8785/cc.openframeworks.androidEmptyExample I/OF: loading x86 library
05-26 19:03:58.544 8785-8785/cc.openframeworks.androidEmptyExample I/OF: failed x86 loading, trying neon detection
                                                                     java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_0-classes.dex"],nativeLibraryDirectories=[/data/app/cc.openframeworks.androidEmptyExample-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libOFAndroidApp_x86.so"
                                                                         at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                                         at java.lang.System.loadLibrary(System.java:1076)
                                                                         at cc.openframeworks.OFAndroid.<clinit>(OFAndroid.java:1027)
                                                                         at cc.openframeworks.androidEmptyExample.OFActivity.onCreate(OFActivity.java:18)
                                                                         at android.app.Activity.performCreate(Activity.java:6270)
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609)
                                                                         at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                         at android.os.Looper.loop(Looper.java:207)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5683)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)
05-26 19:03:58.545 8785-8785/cc.openframeworks.androidEmptyExample I/OF: failed neon detection, loading not-neon library
                                                                     java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_0-classes.dex"],nativeLibraryDirectories=[/data/app/cc.openframeworks.androidEmptyExample-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libneondetection.so"
                                                                         at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                                         at java.lang.System.loadLibrary(System.java:1076)
                                                                         at cc.openframeworks.OFAndroid.<clinit>(OFAndroid.java:1033)
                                                                         at cc.openframeworks.androidEmptyExample.OFActivity.onCreate(OFActivity.java:18)
                                                                         at android.app.Activity.performCreate(Activity.java:6270)
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609)
                                                                         at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                         at android.os.Looper.loop(Looper.java:207)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5683)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)
05-26 19:03:58.546 8785-8785/cc.openframeworks.androidEmptyExample D/AndroidRuntime: Shutting down VM
05-26 19:03:58.547 8785-8785/cc.openframeworks.androidEmptyExample E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                 Process: cc.openframeworks.androidEmptyExample, PID: 8785
                                                                                 java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/cc.openframeworks.androidEmptyExample/files/instant-run/dex/slice-slice_0-classes.dex"],nativeLibraryDirectories=[/data/app/cc.openframeworks.androidEmptyExample-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libOFAndroidApp.so"
                                                                                     at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                                                     at java.lang.System.loadLibrary(System.java:1076)
                                                                                     at cc.openframeworks.OFAndroid.<clinit>(OFAndroid.java:1044)
                                                                                     at cc.openframeworks.androidEmptyExample.OFActivity.onCreate(OFActivity.java:18)
                                                                                     at android.app.Activity.performCreate(Activity.java:6270)
                                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
                                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
                                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609)
                                                                                     at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                                     at android.os.Looper.loop(Looper.java:207)
                                                                                     at android.app.ActivityThread.main(ActivityThread.java:5683)
                                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
                                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)
05-26 19:03:58.552 8785-8785/cc.openframeworks.androidEmptyExample I/Process: Sending signal. PID: 8785 SIG: 9

I have tried entering ABIS_TO_COMPILE_RELEASE = x86 into the config.make but no difference.

Would appreciate any input, thanks!

Leon

I’ve just realised my phone’s processor is an armv8. Should have backwards compatibility with armv7 binaries right?

Writing both:

ABIS_TO_COMPILE_RELEASE = armv7
ABIS_TO_COMPILE_DEBUG = armv7

In config.make have not made a difference either

@arturo

I think there are many posts about this issue, I did have the same also, but no solution as far as I know.
I’ve been using windows instead of osx to be able to compile

@Rancs Thanks! A while ago you posted about setting up openFrameworks as a shared lib, is that still a viable option?

@talaron thanks for dropping by - I could vm windows but frankly would rather keep dev’ing on unix if possible!

@superdude I am not sure if it is an option in your case because your device is looking for 64bit libraries. That’s why I mentioned arturo

yes OF doesn’t support 64bits yet, i’m not sure if you can run 32bits libraries on 64bits in android (you usually can on other platforms). if that’s the problem then you would need to recompile all the dependencies and OF itself for 64bits. what device are you using?

I’m using a fairly obscure but new Chinese model: Elephone p9000. Specs here:

I’ll have a Google about 32bit on 64bit processors let me know if you have any thoughts.

Many thanks

Section 3.3.1 of the Android 6.0 Compatibility Definition states “[an Android application binary interface] MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported”. I believe that’s pertinent?

So in order to compile OF, is that done in a similar manner to how it’s done with the git build via bash?