Yes, I know this question is similar to this, but it never got answered and I don't like resurrecting old threads (from July '13).
I just began testing my game on a real device (yay!), and though it works perfectly on the Corona Simulator, every time I open it on the actual device and now the emulator, I get "Sorry! The application SampleApp (process com.foo.bar.SampleApp) has stopped unexpectedly. Please try again." I opened adb logcat
and find that I'm getting this error:
I/ActivityThread( 1264): Pub com.foo.bar.SampleApp.files: com.ansca.corona.storage.FileContentProvider
W/dalvikvm( 1264): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/JavaToNativeShim;
W/dalvikvm( 1264): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/ansca/corona/CoronaEnvironment;
D/AndroidRuntime( 1264): Shutting down VM
W/dalvikvm( 1264): threadid=1: thread exiting with uncaught exception (group=0x40020560)
E/AndroidRuntime( 1264): FATAL EXCEPTION: main
E/AndroidRuntime( 1264): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaView.deleteTempDirectory(CoronaView.java:141)
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaActivity.onCreate(CoronaActivity.java:101)
E/AndroidRuntime( 1264): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 1264): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1618)
E/AndroidRuntime( 1264): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1670)
E/AndroidRuntime( 1264): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 1264): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 1264): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1264): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1264): at android.app.ActivityThread.main(ActivityThread.java:3695)
E/AndroidRuntime( 1264): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1264): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 1264): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
E/AndroidRuntime( 1264): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
E/AndroidRuntime( 1264): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1264): Caused by: java.lang.ExceptionInInitializerError
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:379)
E/AndroidRuntime( 1264): at com.ansca.corona.CoronaEnvironment.<clinit>(CoronaEnvironment.java:41)
E/AndroidRuntime( 1264): ... 15 more
E/AndroidRuntime( 1264): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lua: findLibrary returned null
E/AndroidRuntime( 1264): at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/AndroidRuntime( 1264): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 1264): at com.ansca.corona.JavaToNativeShim.<clinit>(JavaToNativeShim.java:118)
E/AndroidRuntime( 1264): ... 17 more
W/ActivityManager( 146): Force finishing activity com.foo.bar.SampleApp/com.ansca.corona.CoronaActivity
Of course, the real process name isn't com.foo.bar.SampleApp
, but it's the same thing.
I have an old Android, so that may be the issue, but I sure hope not. I'm on a Huawei-U8652
, Android version 2.3.5
. I also built a Corona sample code app, and it did the same thing with the same error.