UnsatisfiedLinkError Exception for NDK

This page is now deprecated. For the latest version, please click here.



With our universal AAR, an UnsatisfiedLinkError exception will be thrown when your APK builds only for a subset of supported architectures.


04-20 16:10:37.337: W/dalvikvm(10408): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/hcg/IF/IF;

04-20 16:10:37.337: W/dalvikvm(10408): threadid=1: thread exiting with uncaught exception (group=0x4001d560)

04-20 16:10:37.337: E/AndroidRuntime(10408): FATAL EXCEPTION: main

04-20 16:10:37.337: E/AndroidRuntime(10408): java.lang.ExceptionInInitializerError

04-20 16:10:37.337: E/AndroidRuntime(10408): at java.lang.Class.newInstanceImpl(Native Method)

04-20 16:10:37.337: E/AndroidRuntime(10408): at java.lang.Class.newInstance(Class.java:1409)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.app.ActivityThread.access$1500(ActivityThread.java:117)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.os.Handler.dispatchMessage(Handler.java:99)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.os.Looper.loop(Looper.java:130)

04-20 16:10:37.337: E/AndroidRuntime(10408): at android.app.ActivityThread.main(ActivityThread.java:3683)

04-20 16:10:37.337: E/AndroidRuntime(10408): at java.lang.reflect.Method.invokeNative(Native Method)

04-20 16:10:37.337: E/AndroidRuntime(10408): at java.lang.reflect.Method.invoke(Method.java:507)

04-20 16:10:37.337: E/AndroidRuntime(10408): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)

04-20 16:10:37.337: E/AndroidRuntime(10408): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)

04-20 16:10:37.337: E/AndroidRuntime(10408): at dalvik.system.NativeStart.main(Native Method)

04-20 16:10:37.337: E/AndroidRuntime(10408): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load game: findLibrary returned null

04-20 16:10:37.337: E/AndroidRuntime(10408): at java.lang.Runtime.loadLibrary(Runtime.java:429)

04-20 16:10:37.337: E/AndroidRuntime(10408): at java.lang.System.loadLibrary(System.java:554)

04-20 16:10:37.337: E/AndroidRuntime(10408): ... 15 more


There are a few solutions:


  1. Add APP_ABI := all in your Application.mk/Android.mk

  2. Use the Apk Abi splits functionality in Gradle outlined here: http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits

  3. Manually remove the unwanted architectures from kit-libs/com-crashlytics-sdk-android_crashlytics-ndk/libs/

Feedback and Knowledge Base