Can lua scripts be used in java android project?

Is it possible to call lua scripts from java code for an Android system? I discovered the Scripting Layer for Android, and I played with it on my device, but it would be very helpful if I could call the lua scripts from my Eclipse projects. I know that this is possible if I develop in the NDK, but I have no desire to go this route (Java is just too good). Thanks in advance.

+6
java android eclipse lua
source share
6 answers

Lua Translator does not ship with Android OS. Therefore, you either need SL4A, or you need to integrate it yourself through the NDK. There is no other magic possible. Sorry!

+8
source share

In fact, you can easily port the Lua library to Android using the NDK . Take a look at my attempt - AndroLua , which allows you to run scripts, write them using the GUI or over the network and print output from print .

It even comes with LuaJava , so you can work with Java objects in Lua, for example, the current launch of Activity is available in Lua as a global Activity , and from this you can call, for example, activity:setTitle('Modified from Lua') .

+19
source share

I think you can also use one of the Java Lua implementations.

See some links here: how can I insert lua in java?

+2
source share

There is SL4A:

http://code.google.com/p/android-scripting/

Also, if you are programming games, you can see the Moai open source project:

http://getmoai.com/

0
source share

You should take a look at the project "Kahlua 2"

0
source share

Updating this somewhat old Corona question has long been allowing Lua development on Android. (The subscription fee for publishing Android games is $ 199 / year, but the SDK is a free download for testing)

And the games developed with it will (presumably) work on the iPhone (although it will be another $ 199 / year).

Disclaimer: I am not affiliated with anyone, nor with Corona.

-one
source share

All Articles