Hi,
I’ve seen some other threads about how the print statement does not output to android logcat using a corona app built for android. I’ve been doing some investigating because the app I built does not output print statements when deployed to an android device.
I did some testing using the built in Corona template named “Physics Based Game”. (Find attached project code)
-
I created a brand new app using the “Physics Based Game” template from the Corona Simulator New Project wizard.
-
I added strategic print statements to the start and end of each lua file as well as to the start and end of the createScene and enterScene methods in each of the lua files (where applicable).
-
I ran the app in the Corona simulator and recorded the output
-
I built the app for android and deployed it to an android device emulator and recorded the logcat output
Below are my results…
Corona simulator console output:
Copyright © 2009-2013 C o r o n a L a b s I n c .
Version: 3.0.0
Build: 2013.2100
main.lua - executing
menu.lua - executing
menu.lua - executed
menu.lua - createScene start
Warning: could not load font HelveticaNeue-Light. Using default font.
menu.lua - createScene end
main.lua - executed
menu.lua - enterScene start
menu.lua - enterScene end
level1.lua - executing
level1.lua - executed
level1.lua - createScene start
level1.lua - createScene end
level1.lua - enterScene start
level1.lua - enterScene end
Android device emulator logcat output:
02-24 18:36:10.012: I/ActivityManager(385): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.outlook.spacewolf.hello_world2/com.ansca.corona.CoronaActivity} from pid 752
02-24 18:36:10.252: I/ActivityManager(385): Start proc com.outlook.spacewolf.hello_world2 for activity com.outlook.spacewolf.hello_world2/com.ansca.corona.CoronaActivity: pid=2307 uid=10060 gids={50060}
02-24 18:36:13.272: I/Corona(2307): menu.lua - createScene start
02-24 18:36:13.352: I/Corona(2307): menu.lua - enterScene start
02-24 18:36:28.762: I/Corona(2307): level1.lua - createScene start
02-24 18:36:29.822: I/Corona(2307): level1.lua - enterScene start
Conclusion
As you can see, there are many print statements missing from the logcat output. I did not filter the logcat output in any way.
Corona guys, can you please comment on this? It looks like there is a bug…
My system
Corona Simulator 2013.2100
Android Emulator Device:
- Target: Android 4.4.2
- API Level: 19
- CPU/ABI - ARM (armeabi-v7a)
Java 6