I have working code (runs on iOS, Flash, and Mac Desktop) which I’m now trying to run on Andorid.
After some fiddling in getting the emulator running and enabling the gpu on it, my code compiles fine and seems to run fine, too (I get sound and all the expected trace messages). I can even hit (invisible) buttons.
But: the screen is blank (both with -legacy and without). Actually, I have a .swf file in the project at some point and that is the only element I see on the screen.
Any idea what is going on? And yes, I have seen the other post on “Black Screen in Android Emulator”, but unlike these, I do not get an OpenGL error message.
I see some error messages in the trace, but none seems really related to display, as far as I can tell:
E/ThrottleService( 148): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
I tried to run openfl samples on emulator and failed, there is a black screen as you mentioned. Then I downloaded some apk files of games from http://www.openfl.org/showcase/, only Lightbot run perfectly. I don’t know what is the issue, but something is not right for emulators.
Openfl 3.3.3 and Lime 2.6.2 for me. However, previous versions gives black screen also for the emulator. Best screen I received, which is not completely black, was on bunny mark example:
Just upgraded to OS X 10.10 and reinstalled all android tools, but same result - no error message, app seems to run fine, sounds is there, clicks register, but no display (other than a lone SWF).
So I tried that now on PiratePig, setting bitmapData.image.powerOfTwo = true;
This is what I get:
Starting: Intent { act=android.intent.action.MAIN cmp=org.openfl.samples.piratepig/.MainActivity }
*:E lime:D Main:D GameActivity:D GLThread:D trace:D
E/BatteryService( 149): usbOnlinePath not found
E/BatteryService( 149): batteryVoltagePath not found
E/BatteryService( 149): batteryTemperaturePath not found
E/PowerManagerService-JNI( 149): Couldn’t load power module (No such file or directory)
E/SoundPool( 149): error loading /system/media/audio/ui/Lock.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/Unlock.ogg
E/EventHub( 149): could not get driver version for /dev/input/mouse0, Not a typewriter
E/EventHub( 149): could not get driver version for /dev/input/mice, Not a typewriter
E/Trace ( 149): error opening trace file: No such file or directory (2)
E/CommandListener( 33): Failed to open /proc/sys/net/ipv6/conf/wlan0/disable_ipv6: No such file or directory
E/WifiStateMachine( 149): Failed to disable IPv6: java.lang.IllegalStateException: command ‘1 interface ipv6 wlan0 disable’ failed with '400 1 Failed to change IPv6 state (No such file or directory)'
E/MobileDataStateTracker( 149): default: Ignoring feature request because could not acquire PhoneService
E/MobileDataStateTracker( 149): default: Could not enable APN type "default"
E/Trace ( 205): error opening trace file: No such file or directory (2)
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
E/Trace ( 219): error opening trace file: No such file or directory (2)
E/Trace ( 234): error opening trace file: No such file or directory (2)
E/Trace ( 252): error opening trace file: No such file or directory (2)
E/Trace ( 272): error opening trace file: No such file or directory (2)
E/ActivityThread( 219): Failed to find provider info for com.android.inputmethod.latin.dictionarypack
E/BinaryDictionaryGetter( 219): Could not find a dictionary pack
E/Trace ( 296): error opening trace file: No such file or directory (2)
E/Trace ( 314): error opening trace file: No such file or directory (2)
E/Trace ( 338): error opening trace file: No such file or directory (2)
E/Trace ( 343): error opening trace file: No such file or directory (2)
E/SoundPool( 149): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 149): error loading /system/media/audio/ui/KeypressReturn.ogg
E/Trace ( 380): error opening trace file: No such file or directory (2)
E/Trace ( 407): error opening trace file: No such file or directory (2)
E/Trace ( 431): error opening trace file: No such file or directory (2)
E/Trace ( 448): error opening trace file: No such file or directory (2)
E/VoldConnector( 149): NDC Command {3 volume mount /mnt/sdcard} took too long (12141ms)
E/Trace ( 475): error opening trace file: No such file or directory (2)
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
E/Trace ( 544): error opening trace file: No such file or directory (2)
E/Trace ( 561): error opening trace file: No such file or directory (2)
E/Trace ( 575): error opening trace file: No such file or directory (2)
E/Trace ( 604): error opening trace file: No such file or directory (2)
E/CFFILoader.h( 604): Could not API hx_register_prim
E/CFFILoader( 604): Could not find function:hx_register_prim
F/libc ( 604): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 604 (mples.piratepig)
E/Trace ( 626): error opening trace file: No such file or directory (2)
E/CFFILoader.h( 626): Could not API hx_register_prim
E/CFFILoader( 626): Could not find function:hx_register_prim
F/libc ( 626): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 626 (mples.piratepig)