Download

dlopen("/data/app-lib/XXX-1/libUE4.so") failed

Hello, I’ve successfully deployed an empty C++ project to Android, so now I’m trying to do the same with my main project, but nope… Here’s the LogCat output, any ideas?

09-07 11:50:51.715: D/ActivityThread(16860): handleBindApplication:pl.rdsgroup.shapedraft
09-07 11:50:51.715: D/ActivityThread(16860): setTargetHeapUtilization:0.75
09-07 11:50:51.715: D/ActivityThread(16860): setTargetHeapMinFree:2097152
09-07 11:50:51.805: D/dalvikvm(16860): Trying to load lib /data/app-lib/pl.rdsgroup.shapedraft-1/libgnustl_shared.so 0x41bfa998
09-07 11:50:51.825: D/dalvikvm(16860): Added shared lib /data/app-lib/pl.rdsgroup.shapedraft-1/libgnustl_shared.so 0x41bfa998
09-07 11:50:51.825: D/dalvikvm(16860): No JNI_OnLoad found in /data/app-lib/pl.rdsgroup.shapedraft-1/libgnustl_shared.so 0x41bfa998, skipping init
09-07 11:50:51.825: D/dalvikvm(16860): Trying to load lib /data/app-lib/pl.rdsgroup.shapedraft-1/libvrapi.so 0x41bfa998
09-07 11:50:51.860: D/dalvikvm(16860): Added shared lib /data/app-lib/pl.rdsgroup.shapedraft-1/libvrapi.so 0x41bfa998
09-07 11:50:51.860: D/dalvikvm(16860): No JNI_OnLoad found in /data/app-lib/pl.rdsgroup.shapedraft-1/libvrapi.so 0x41bfa998, skipping init
09-07 11:50:51.860: D/dalvikvm(16860): Trying to load lib /data/app-lib/pl.rdsgroup.shapedraft-1/libUE4.so 0x41bfa998
09-07 11:50:51.950: E/dalvikvm(16860): dlopen("/data/app-lib/pl.rdsgroup.shapedraft-1/libUE4.so") failed: dlopen failed: cannot locate symbol "atof" referenced by "libUE4.so"...
09-07 11:50:51.950: W/dalvikvm(16860): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/epicgames/ue4/GameActivity;
09-07 11:50:51.950: W/dalvikvm(16860): Class init failed in newInstance call (Lcom/epicgames/ue4/GameActivity;)
09-07 11:50:51.955: D/AndroidRuntime(16860): Shutting down VM
09-07 11:50:51.955: W/dalvikvm(16860): threadid=1: thread exiting with uncaught exception (group=0x416face0)
09-07 11:50:51.960: E/AndroidRuntime(16860): FATAL EXCEPTION: main
09-07 11:50:51.960: E/AndroidRuntime(16860): Process: pl.rdsgroup.shapedraft, PID: 16860
09-07 11:50:51.960: E/AndroidRuntime(16860): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "atof" referenced by "libUE4.so"...
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at java.lang.Runtime.loadLibrary(Runtime.java:364)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at java.lang.System.loadLibrary(System.java:526)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at com.epicgames.ue4.GameActivity.<clinit>(GameActivity.java:1211)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at java.lang.Class.newInstanceImpl(Native Method)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at java.lang.Class.newInstance(Class.java:1208)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2122)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.app.ActivityThread.access$800(ActivityThread.java:144)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.os.Looper.loop(Looper.java:136)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at android.app.ActivityThread.main(ActivityThread.java:5146)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at java.lang.reflect.Method.invokeNative(Native Method)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at java.lang.reflect.Method.invoke(Method.java:515)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
09-07 11:50:51.960: E/AndroidRuntime(16860): 	at dalvik.system.NativeStart.main(Native Method)

// Edit
So I’ve found out that it’s happening on Samsung Galaxy S3 when I use custom GameInstance. On HTC M8 the error doesn’t exist.

Hi Kosmo,

Check the that you are using android-19 as the NDK API Level in Android SDK settings. If you set this higher your apk will only work on Lollipop (Android 5.0) and above.

Hey Chris, thanks for help,

unfortunately it didn’t change a thing. :confused:

Hi Kosmo,

This really is the NDK API Level set to above android-19 causing the problem. Some standard functions (like atof) were moved from static inline to libc.so starting with android-21. Only Lollipop and above have the libc.so with the functions which is why it is failing in dlopen.

If you have checked the NDK API Level is actually set to android-19, I’d next check to make sure it recompiled. Try turning on “Full Rebuild” in the Project Settings Packaging section. You should see it recompile your source files when you package.

Ohhh I’m such a dummy… thank you very much! Works like a charm :slight_smile: