AndroLua icon indicating copy to clipboard operation
AndroLua copied to clipboard

Where does standard output go?

Open pakoito opened this issue 11 years ago • 1 comments

For some reason I cannot find the standard output for my scripts, as it doesn't go to logcat or Android console. I'm loading them from files in programming time and executing a simple print("hello") every second, PC does it correctly but it's lost on Android. If I try other methods that would affect my application they are executed correctly so I know the scripts are being loaded.

pakoito avatar Jun 13 '13 19:06 pakoito

If you're using safeEvalLua or evalLua, then output should be in the return value, which is a String. eg: String result = xxx.safeEvalLua("print(\"Hello, world!\")"); // result should be "Hello, world!"

Reposting this result to logcat should be very easy. Just use System.out.println

liuyanghejerry avatar Dec 11 '13 04:12 liuyanghejerry