AndroLua
AndroLua copied to clipboard
Where does standard output go?
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.
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