Hi everyone, I’m developing a tile-based game for mobile platforms, written in Haxe (with Openfl): it works like a charm when I try it for Html5 or a desktop target (Mac OS), but it crashes in its Android version.
I don’t get errors, but I figured out the line which causes the
problem (if I remove the code from that line, the application works):
var bitm = Assets.getBitmapData("assets/grass0.png");
I already posted my situation (with logcat output) on my StackOverflow question: StackOverflow: Android crash because of BitmapData, but I’ll write a little resume:
- The image is OK: it isn’t too big, it is included in the Android folder, and I also tried using other images, without success
- Changing Openfl version wasn’t helpful:
- 3.1.1: Android crash without errors
- 3.1.3: I get
/usr/lib/haxelib/openfl/3,1,3/openfl/display/Loader.hx:4: characters 7-35 : Type not found : lime.system.BackgroundWorker
- 3.1.4: I get
/usr/lib/haxelib/openfl/3,1,4/openfl/display/BitmapData.hx:5: characters 7-44 : Type not found : lime.graphics.cairo.CairoImageSurface
- Same crash if I compile a sample project (PiratePig)
- I get this errors only with Android targets: Html5 and desktop versions work
- I tried to change computer, but I get same results with both Mac OS X Yosemite (Macbook Pro 13" Retina) and Windows 7
- I tried to change device, but I get same results with both my Samsung Galaxy Tab 2 10.1" and the AVD emulator (Nexus 5)
I really hope (and think) you can help me!