Crashes on Android but Not on flash/Windows (see android runtime errors?)

104 views
Skip to first unread message

drew tenenbaum

unread,
Dec 22, 2015, 2:33:43 PM12/22/15
to HaxeFlixel
I've been working on a game that I've been testing on mobile.
I've gotten it to run on past builds, but recently something strange has been occurring.

Currently, i can compile and run just fine in Windows and Flash variants.
But when the app runs on android it crashes before any graphics even display.
It's worked on android before....like maybe this is crazy, but i feel like sometimes i build it and it exits out on run on android, and then without changing anything,run it again and it works.

Is it possible it's because it's trying to access a not loaded resource (image?), or something? Though graphics display fine and no crashes on flash/win, remember.
Any ideas? I load 1 json and 1 image into a packerdtata in Main.hx before any game setup.

Also what would be really helpful is getting Runtime Errors when testing 
Anyone know how i can see those? Like if there is a NullRefExeption? 
I've tried:
lime test android -debug

and that prints.....some things,
but not run-time errors? or am i mistaken?

Any help on this would be great.
-Drew

Gama11

unread,
Dec 22, 2015, 2:43:27 PM12/22/15
to HaxeFlixel
Try adb logcat.

drew tenenbaum

unread,
Dec 23, 2015, 8:38:01 PM12/23/15
to HaxeFlixel
this is the error I'm getting in logcat.
It doesnt seem to be related to the actual haxe code i wrote.

Anyone seen this befire?
Some quick googling told me it has to do with the android target sdk being too low? can that be manually adjusted in haxelflixel? is that even the issue?

Any help would be great! 


java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.example.myapp-2/lib/arm/libApplicationMain.so" has bad ELF magic

E/AndroidRuntime(18898): at java.lang.Runtime.loadLibrary(Runtime.java:371)

E/AndroidRuntime(18898): at java.lang.System.loadLibrary(System.java:988)

E/AndroidRuntime(18898): at org.haxe.HXCPP.run(HXCPP.java:18)

E/AndroidRuntime(18898): at org.haxe.lime.GameActivity.onCreate(GameActivity.java:123)

E/AndroidRuntime(18898): at android.app.Activity.performCreate(Activity.java:6550)

E/AndroidRuntime(18898): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)

E/AndroidRuntime(18898): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3102)

E/AndroidRuntime(18898): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3248)

E/AndroidRuntime(18898): at android.app.ActivityThread.access$1000(ActivityThread.java:197)

E/AndroidRuntime(18898): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)

E/AndroidRuntime(18898): at android.os.Handler.dispatchMessage(Handler.java:102)

E/AndroidRuntime(18898): at android.os.Looper.loop(Looper.java:145)

E/AndroidRuntime(18898): at android.app.ActivityThread.main(ActivityThread.java:6872)

E/AndroidRuntime(18898): at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime(18898): at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime(18898): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)

E/AndroidRuntime(18898): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

drew tenenbaum

unread,
Dec 23, 2015, 9:03:20 PM12/23/15
to HaxeFlixel
Another note is that i figured out when this error happens:
upon 1st install, the android app always works. Subsequent istalls/starts of the application cause the error to be thrown

IF i unistall it then reinstall, the 1st start is fine. then, any subsequent runs fail.

Gama11

unread,
Dec 24, 2015, 5:07:13 AM12/24/15
to HaxeFlixel

Jeru Sanders

unread,
Dec 24, 2015, 9:20:59 PM12/24/15
to haxef...@googlegroups.com
What SDK are you targeting? Try targeting 22 or below by putting the following in your project.xml
<android target-sdk-version="22" />

drew tenenbaum

unread,
Dec 30, 2015, 3:19:44 PM12/30/15
to HaxeFlixel
Thanks. After updating haxeflixel itself as well as adding that line fixed the issues.
Reply all
Reply to author
Forward
0 new messages