Problem with starting the app

Hello,

I am new to Corona and from the start, i have this problem. When I try to run my app in Corona Simulator, it works perfectly. When I try to build for Android (Corona Simulator > File > Build for Android…), it gets done without an error. But when I upload the .apk file to my phone, it crashes at start. I even tried with sample codes, no change.

I’m suspecting from Java because i read a lot that Corona needs Java 6, but when I change the folder name from “jre7” to anything else it gives error 126, “…cant find jvm.dll…” I tried uninstalling all Java, but without installing JDK 7u25 32-bit, it always says error 126.

I also tried on emulator, but nothing is changed.

I read other questions about ExceptionInInitializerError but they didn’t help.

Thanks in advance for all helps.

09-02 01:45:16.132: E/AndroidRuntime(15851): FATAL EXCEPTION: main 09-02 01:45:16.132: E/AndroidRuntime(15851): java.lang.ExceptionInInitializerError 09-02 01:45:16.132: E/AndroidRuntime(15851): at com.ansca.corona.CoronaActivity.onCreate(CoronaActivity.java:130) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.app.ActivityThread.access$1500(ActivityThread.java:132) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.os.Handler.dispatchMessage(Handler.java:99) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.os.Looper.loop(Looper.java:150) 09-02 01:45:16.132: E/AndroidRuntime(15851): at android.app.ActivityThread.main(ActivityThread.java:4277) 09-02 01:45:16.132: E/AndroidRuntime(15851): at java.lang.reflect.Method.invokeNative(Native Method) 09-02 01:45:16.132: E/AndroidRuntime(15851): at java.lang.reflect.Method.invoke(Method.java:507) 09-02 01:45:16.132: E/AndroidRuntime(15851): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 09-02 01:45:16.132: E/AndroidRuntime(15851): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 09-02 01:45:16.132: E/AndroidRuntime(15851): at dalvik.system.NativeStart.main(Native Method) 09-02 01:45:16.132: E/AndroidRuntime(15851): Caused by: java.lang.ExceptionInInitializerError 09-02 01:45:16.132: E/AndroidRuntime(15851): at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:373) 09-02 01:45:16.132: E/AndroidRuntime(15851): at com.ansca.corona.CoronaEnvironment.\<clinit\>(CoronaEnvironment.java:41) 09-02 01:45:16.132: E/AndroidRuntime(15851): ... 14 more 09-02 01:45:16.132: E/AndroidRuntime(15851): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lua: findLibrary returned null 09-02 01:45:16.132: E/AndroidRuntime(15851): at java.lang.Runtime.loadLibrary(Runtime.java:429) 09-02 01:45:16.132: E/AndroidRuntime(15851): at java.lang.System.loadLibrary(System.java:554) 09-02 01:45:16.132: E/AndroidRuntime(15851): at com.ansca.corona.JavaToNativeShim.\<clinit\>(JavaToNativeShim.java:97) 09-02 01:45:16.132: E/AndroidRuntime(15851): ... 16 more 09-02 01:45:16.142: W/ActivityManager(138): Force finishing activity com.muratari.TimeAnimation/com.ansca.corona.CoronaActivity

Look for errors in your build.settings file.  Can you put a few print statements into your main.lua to see if it’s getting anywhere?  If it were a signing problem I wouldn’t think you would get that far.

Still if you can get Java 6 installed it would be worth trying.

I don’t have a build.settings file in my project. But I am using sample codes to build for android, while dealing with this problem. If sample code works, I’ll try to fix my project but even sample code doesn’t work.

Print statements are working while testing on Corona Simulator, they can be seen in terminal windows. Actually everything is working on Corona Simulator. Problem starts after creating .apk file.

I installed Java 6 but Corona seems to be picking the Java 7. I tried uninstalling everything and just installing Java 6, but Corona won’t work until I install Java 7.

Erm…silly me.

I didn’t checked ARM version of my phone and emulator. ARMv6 in my phone and Intel in emulator… So, it wasn’t supposed to work. :slight_smile:

After changing emulator to ARM, both of codes -sample code and my project- started running just fine.

Hi,

i have the exact same problem, same errors display in ddms, but your soulution doesn’t work for me.

I have tried to use few different AVD (with ARM cpu chosen) settings for emulator, none of them works.

The app i’m trying to get to work is sample app HelloWorld, build.settings looks like this:

settings =
{
    android =
    {
        versionCode = “11”,
    },
    orientation =
    {
        default = “portrait”,
        supported = { “portrait” }
    },
    iphone =
    {
        plist =
        {
            CFBundleIconFile = “Icon.png”,
            CFBundleIconFiles =
            {
                “Icon.png”,
                “Icon@2x.png”,
                “Icon-72.png”,
                “Icon-72@2x.png”,
            },
        },
    },
}
 

Can you tell me your AVD settings for emulator? Any ideas and suggestions would be appreciated.

Look for errors in your build.settings file.  Can you put a few print statements into your main.lua to see if it’s getting anywhere?  If it were a signing problem I wouldn’t think you would get that far.

Still if you can get Java 6 installed it would be worth trying.

I don’t have a build.settings file in my project. But I am using sample codes to build for android, while dealing with this problem. If sample code works, I’ll try to fix my project but even sample code doesn’t work.

Print statements are working while testing on Corona Simulator, they can be seen in terminal windows. Actually everything is working on Corona Simulator. Problem starts after creating .apk file.

I installed Java 6 but Corona seems to be picking the Java 7. I tried uninstalling everything and just installing Java 6, but Corona won’t work until I install Java 7.

Erm…silly me.

I didn’t checked ARM version of my phone and emulator. ARMv6 in my phone and Intel in emulator… So, it wasn’t supposed to work. :slight_smile:

After changing emulator to ARM, both of codes -sample code and my project- started running just fine.

Hi,

i have the exact same problem, same errors display in ddms, but your soulution doesn’t work for me.

I have tried to use few different AVD (with ARM cpu chosen) settings for emulator, none of them works.

The app i’m trying to get to work is sample app HelloWorld, build.settings looks like this:

settings =
{
    android =
    {
        versionCode = “11”,
    },
    orientation =
    {
        default = “portrait”,
        supported = { “portrait” }
    },
    iphone =
    {
        plist =
        {
            CFBundleIconFile = “Icon.png”,
            CFBundleIconFiles =
            {
                “Icon.png”,
                “Icon@2x.png”,
                “Icon-72.png”,
                “Icon-72@2x.png”,
            },
        },
    },
}
 

Can you tell me your AVD settings for emulator? Any ideas and suggestions would be appreciated.