java.lang.UnsatisfiedLinkError

Hi There

 

We’ve build our Corona SDK apps with the Enterprise(2015.2638) and have noticed a significant increase of errors reported on google play. Does anybody have an idea what it might be since the app is working fine on all our test devices?

 

java.lang.ExceptionInInitializerError

at com.iabuzz.puzzle4kidsAnimals.puzzle4kidsAnimals.onCreate(puzzle4kidsAnimals.java:22)

at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)

at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3276)

at android.app.ActivityThread.access$2200(ActivityThread.java:117)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:130)

at android.app.ActivityThread.main(ActivityThread.java:3687)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:507)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)

at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.ExceptionInInitializerError

at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:322)

at com.ansca.corona.CoronaEnvironment.<clinit>(CoronaEnvironment.java:50)

… 13 more

Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load lua: findLibrary returned null

at java.lang.Runtime.loadLibrary(Runtime.java:429)

at java.lang.System.loadLibrary(System.java:554)

at com.ansca.corona.JavaToNativeShim.<clinit>(JavaToNativeShim.java:108)

… 15 more

Engineering couldn’t really determine a Corona source causing it.  Can you tell us more about the devices having problems?

Rob

Hi Robb

It seems that it’s all samsung devices. Here is the list:

Untitled.png

These devices have ARMv6 CPUs.

Corona only supports devices that have ARMv7 CPUs.

It sounds like your Android app project is not setup correctly and it’s wrongly copying over Corona’s native C/C++ *.so libraries to the wrong subdirectory under your project’s “libs” directory.  The *.so files need to be under the following directory…

   ./libs/armeab-v7a

You can verify this by unzipping your compiled APK.  Just rename APK’s extension from *.apk to *.zip and double click to extract it.  Look under the “libs” directory to see where the *.so files are located.  If they’re not under the “libs/armeab-v7a” directory, then that’s the problem.

Did you drag-and-drop Corona’s libraries to your project’s “libs” directory yourself.  If so, then I don’t recommend it.  A better way to include an Android library into your application via the Android SDK “ant” build system is to add a reference to it via your project’s “project.properties” file.  Have a look at the following Corona Enterprise sample project for an example…

   “./CoronaEnterprise/Samples/IncludeAllFeatures/android/project.properties”

Engineering couldn’t really determine a Corona source causing it.  Can you tell us more about the devices having problems?

Rob

Hi Robb

It seems that it’s all samsung devices. Here is the list:

Untitled.png

These devices have ARMv6 CPUs.

Corona only supports devices that have ARMv7 CPUs.

It sounds like your Android app project is not setup correctly and it’s wrongly copying over Corona’s native C/C++ *.so libraries to the wrong subdirectory under your project’s “libs” directory.  The *.so files need to be under the following directory…

   ./libs/armeab-v7a

You can verify this by unzipping your compiled APK.  Just rename APK’s extension from *.apk to *.zip and double click to extract it.  Look under the “libs” directory to see where the *.so files are located.  If they’re not under the “libs/armeab-v7a” directory, then that’s the problem.

Did you drag-and-drop Corona’s libraries to your project’s “libs” directory yourself.  If so, then I don’t recommend it.  A better way to include an Android library into your application via the Android SDK “ant” build system is to add a reference to it via your project’s “project.properties” file.  Have a look at the following Corona Enterprise sample project for an example…

   “./CoronaEnterprise/Samples/IncludeAllFeatures/android/project.properties”