Dear sirs,
Print is not working with Android.
Messages is not shown on log.
Do you have some tip ?
Thank you,
[import]uid: 62613 topic_id: 32179 reply_id: 332179[/import]
Dear sirs,
Print is not working with Android.
Messages is not shown on log.
Do you have some tip ?
Thank you,
[import]uid: 62613 topic_id: 32179 reply_id: 332179[/import]
I can see my “print” messages in the Corona terminal when running the Corona simulator but I don’t see the messages when I’m running on the device.
What am I doing wrong?
Thank you [import]uid: 62613 topic_id: 32179 reply_id: 128098[/import]
Same here, I think;
Having read somewhere that you can monitor corona debug info on android devices using:
“C:\Program Files\Android\android-sdk\platform-tools\adb.exe” logcat
I am now looking at the ADB logcat output, can see my app start-up, but none of the print statements show, how disappointing…
I am a newbie here, evaluating Corona using Glider as IDE, Debugging with Glider works fine on the simulator, Not being able to trace/log messages running on the device is not good…
edit: I have tried adding io.output():setvbuf(‘no’) to main.lua, even io.flush(), still no print output in logcat !? [import]uid: 186146 topic_id: 32179 reply_id: 128154[/import]
I can see my “print” messages in the Corona terminal when running the Corona simulator but I don’t see the messages when I’m running on the device.
What am I doing wrong?
Thank you [import]uid: 62613 topic_id: 32179 reply_id: 128098[/import]
Same here, I think;
Having read somewhere that you can monitor corona debug info on android devices using:
“C:\Program Files\Android\android-sdk\platform-tools\adb.exe” logcat
I am now looking at the ADB logcat output, can see my app start-up, but none of the print statements show, how disappointing…
I am a newbie here, evaluating Corona using Glider as IDE, Debugging with Glider works fine on the simulator, Not being able to trace/log messages running on the device is not good…
edit: I have tried adding io.output():setvbuf(‘no’) to main.lua, even io.flush(), still no print output in logcat !? [import]uid: 186146 topic_id: 32179 reply_id: 128154[/import]
Corona Labs, do you have some tip ? [import]uid: 62613 topic_id: 32179 reply_id: 128352[/import]
You need to connect your Android device to your computer via USB. Make sure that your device displays a notification “USB debugging connected” in the status bar. From there, you can use the Android SDK tool “adb logcat” or “ddms” to view the Android log.
If these tools are unable to connect to your Android device, then that means you do not have your Android device driver installed on your machine, which is typically the case on Windows. You’ll need to go to the device manufacturer’s website and get a hold of the driver. [import]uid: 32256 topic_id: 32179 reply_id: 128361[/import]
Maybe Joshua misunderstood the question ?
We are looking at the logcat output already, USB driver & debugging setup properly, that is not the problem,
The problem is that the Print messages are not appearing in the logcat output as they should when running the APK on a real device, i can see my Corona test App start up, but none of the Print messages appear.
The same thing happens on my Gingerbread phone and my ICS (4.03) tablet, I installed the APK on the devices using ADB install <app.apk> [import]uid: 186146 topic_id: 32179 reply_id: 128393[/import] </app.apk>
I just tried the release version, build #894, and the newest daily build #936. Both versions are logging correctly on Android. I personally use print() statements every day when developing and debugging on Android. So, I don’t think this is a bug. Something else must be wrong.
The print() functions work as is. You don’t have to redirect output via io.output() at all.
Perhaps you should try a super simple project, such as main.lua that only contains print statements. Don’t include/require any other Lua library in case they are redirecting input and messing up the log.
[import]uid: 32256 topic_id: 32179 reply_id: 128442[/import]
Right, now we are getting somewhere…
I take the HelloWorld example main.lua and add some print() statements there, this time it works !
However, now the mystery is why it works on some projects and it doesn’t on others, examining the HelloWorld project build.settings, config.lua i see nothing special, yet…
[import]uid: 186146 topic_id: 32179 reply_id: 128468[/import]
Perhaps its your call to io.output()? Or you are using a Lua library that is redirecting output?
I never redirect output on my Android apps. [import]uid: 32256 topic_id: 32179 reply_id: 128470[/import]
Corona Labs, do you have some tip ? [import]uid: 62613 topic_id: 32179 reply_id: 128352[/import]
You need to connect your Android device to your computer via USB. Make sure that your device displays a notification “USB debugging connected” in the status bar. From there, you can use the Android SDK tool “adb logcat” or “ddms” to view the Android log.
If these tools are unable to connect to your Android device, then that means you do not have your Android device driver installed on your machine, which is typically the case on Windows. You’ll need to go to the device manufacturer’s website and get a hold of the driver. [import]uid: 32256 topic_id: 32179 reply_id: 128361[/import]
Maybe Joshua misunderstood the question ?
We are looking at the logcat output already, USB driver & debugging setup properly, that is not the problem,
The problem is that the Print messages are not appearing in the logcat output as they should when running the APK on a real device, i can see my Corona test App start up, but none of the Print messages appear.
The same thing happens on my Gingerbread phone and my ICS (4.03) tablet, I installed the APK on the devices using ADB install <app.apk> [import]uid: 186146 topic_id: 32179 reply_id: 128393[/import] </app.apk>
Dear friends,
My App works well when running on iOS devices, everytime. Every print messages are show.
But the same App when running on a Android device does not work, and none of print message are show.
I think it is a Corona SDK Bug, but Corona Labs does not care about our problems. Maybe Corona SDK is not a right choice for develop Android Apps.
Regards, [import]uid: 62613 topic_id: 32179 reply_id: 128523[/import]
mrctito,
Of course we care. If we didn’t care, then we would not have responded to this thread.
The truth is, we can’t reproduce this issue. And we know for a fact that the majority of our customers are able to see print statement in their Android log. So, we just need to isolate why it’s not working for you.
For example, perhaps you or a Lua library that you are using is calling io.output(), which is redirecting output away from the Android log?
Also, have you tried running a main.lua that only contains print() statements? [import]uid: 32256 topic_id: 32179 reply_id: 128530[/import]
I just tried the release version, build #894, and the newest daily build #936. Both versions are logging correctly on Android. I personally use print() statements every day when developing and debugging on Android. So, I don’t think this is a bug. Something else must be wrong.
The print() functions work as is. You don’t have to redirect output via io.output() at all.
Perhaps you should try a super simple project, such as main.lua that only contains print statements. Don’t include/require any other Lua library in case they are redirecting input and messing up the log.
[import]uid: 32256 topic_id: 32179 reply_id: 128442[/import]
Right, now we are getting somewhere…
I take the HelloWorld example main.lua and add some print() statements there, this time it works !
However, now the mystery is why it works on some projects and it doesn’t on others, examining the HelloWorld project build.settings, config.lua i see nothing special, yet…
[import]uid: 186146 topic_id: 32179 reply_id: 128468[/import]
Perhaps its your call to io.output()? Or you are using a Lua library that is redirecting output?
I never redirect output on my Android apps. [import]uid: 32256 topic_id: 32179 reply_id: 128470[/import]
Dear friends,
My App works well when running on iOS devices, everytime. Every print messages are show.
But the same App when running on a Android device does not work, and none of print message are show.
I think it is a Corona SDK Bug, but Corona Labs does not care about our problems. Maybe Corona SDK is not a right choice for develop Android Apps.
Regards, [import]uid: 62613 topic_id: 32179 reply_id: 128523[/import]