java.lang.UnsatisfiedLinkError (Andriod)

Hello all, so i have created a couple of apps and i have published them to play. When i try to run the app i get a crash error.

This is the error log that i get from play
the text inbetween the ***** is black and bolded in the error log

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “srand” referenced by “libUE4.so”…

at java.lang.Runtime.loadLibrary(Runtime.java:361)
at java.lang.System.loadLibrary(System.java:525)
**at com.epicgames.ue4.GameActivity.<clinit>(Unknown Source)**
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1130)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2183)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2316)
at android.app.ActivityThread.access$600(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1298)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:5225)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:741)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)

Bump

,

In order to better assist you, I’m going to need for you to provide me the full logs from your mobile device.

  • Attach your phone to the computer
  • Go here: C:\android-sdk-windows\tools
  • Open up Monitor.bat
  • Launch the program and save the logs

If you cannot get Monitor.bat to open, please go to:

  • C:\android-sdk-windows\tools\lib\monitor-x86
  • Open up Monitor.exe
  • Follow the instructions above

Make sure that you highlight all of the logs, because they do not save unless they’re highlighted.

Thank you!

Hello, this is all that seems to be outputted to the monitor

[link text][1]

93064-log.txt (5.33 KB)

,

Yes, that’s the isolated error, but I’d like to see the whole log to see if there is anything else that’s listed above or below the logs provided.

Can you also upload your Android SDK, here is an example:

78885-androidsdk.png

Hello, here are those as requested

[link text][1]

Change the SDK API Level to matchndk and change the NDK API Level to. If that does not work, I would suggest moving the folders to simply the F:/ . Make sure the Editor is on the same , it seems to be happier that way.

Let me know how it goes, thanks!

Im away from my computer until monday so i shall try it then

2 qeustions, can i just copy the sdk to the root of f or does it need reinstalling

And i unintalled vs2013 a few weeks ago, could that be causing the issue

Yes, you need VS on your computer. We’ve made it possible to use VS 2015 with Android. You should be able to just relocate it, I’ve had others in the past I’ve helped who were able to just move their folders but I have not done that personally as I installed mine on the directly.

Let me know what happens when you can, thanks!

Hello, just to confirm i have VS2015 And UE4.11 Source version
I Have reinstalled andriod works to the route of the HDD That ue4 is on

Still crashes on app load
[PHONELOG][1]

Build fails when useing matchndk and andriod-19

[BuildLog][3]

Android-19 is spelled incorrectly in your SDK settings. I did a test on my end and it looks like the error that you’re getting. Please correct that and then send me any new logs that happen to throw errors.

Fixed that, carnt belive i did that
BUT It is still failing to build

[LOG][1]

94466-log3.txt (29.3 KB)

I thought it would fail again, but it does help limit down the error since the misspelling is taken care of.

Ok, so the UBT Error: Failed to produce item: F:\Unreal\Mazeing\Binaries\Android\Mazeing-Android-Shipping-armv7-es2.so is what we’re seeing.

There seem to be a few different ways this issue has been resolved. I apologize ahead of time, as some of these may end up being tedious, please try the following:

  • [If you’re using GitHub, please check here.][1]
  • [Check out this Forum post][2]
  • Create a new project, make sure that you have it set up for mobile and scaleable graphics (instead of Desktop/maximum). Then migrate your files back over. You may want to do this on a copy of your project, just in case some files do not migrate well.
  • Make sure you’ve updated your Android SDK through the SDK Manager.

Looking forward to hearing back from you, thanks!

Can't make an APK without the compiled .so [UE4Game-armv7-es2.so] - Mobile - Epic Developer Community Forums
[2]: https://forums.unrealengine.com/archive/index.php/t-71543.html

Hello,
checking the UTF Is UTF-8 Hasn’t changed, still fails on build

[link text][1]

The SKD Is up to date and a fresh install since this thread

New Project didnt help whatsoever

And the one about the git version, when building a get a error saying inst valid

The global environment variables are correct
setting the sdk settings to (For the SKD) Still crashed on build

Also have done a full engine rebuild and that hasn’t helped ether

MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:297: error: undefined reference to ‘srand’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:297: error: undefined reference to ‘srand’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime\Core\Private\Android/AndroidMisc.cpp:556: error: undefined reference to ‘sigemptyset’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:294: error: undefined reference to ‘rand’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\Android/AndroidString.h:294: error: undefined reference to ‘atof’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\Android/AndroidString.h:294: error: undefined reference to ‘atof’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\Android/AndroidString.h:303: error: undefined reference to ‘atof’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:294: error: undefined reference to ‘rand’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:294: error: undefined reference to ‘rand’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:294: error: undefined reference to ‘rand’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\Android/AndroidString.h:303: error: undefined reference to ‘atof’
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
MainFrameActions: Packaging (Android (ATC)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: F:\Unreal\Mazeing\Binaries\Android\Mazeing-Android-Shipping-armv7-es2.so

These are the errors within your logs. Since all other suggestions have been exhausted and have not corrected all of the errors, I am suggesting the following. You seem to have a ton of undefined references that seem to be causing one of the packaging files to not compile, which is causing the build to fail. Please go to each line in each file that’s mentioned in the errors below, this is where the issue seems to lay:

  • GenericPlatformMath.h:297
  • AndroidMisc.cpp:556
  • GenericPlatformMath.h:294
  • AndroidString.h:294
  • AndroidString.h:303

What do i need to do at the lines?

Read each of the errors above and try to correct the error that it’s saying. For example:

J:\Desk\GitHub\UnrealEngine\Engine\Source\Runtime/Core/Public\GenericPlatform/GenericPlatformMath.h:294: error: undefined reference to ‘rand’

Go to line 294 and see if there is an undefined reference to ‘rand’ and try to correct it from there. You might need to search for additional information if it’s very unfamiliar to you.

Let us know how it goes. Feel free to upload any new logs as you make progress.