LuaForAndroid
LuaForAndroid copied to clipboard
Android LuaJit + Luajava
This presents how the project was built: Target : LuaJit + Android + Android Lua.
Step 1: Load LuaJava library and add to src folder https://github.com/mkottman/AndroLua/tree/master/src/org/keplerproject/luajava Step 2: JNI/Android.mk : Build all sub dir files JNI/luajava : Containt luajit header which is built by :
_download Luajit http://luajit.org/download.html
_using cywin and bash :
move to
NDK=
We will get luajit.a file
Step 3: Anroid project/ create jni/luajava folder Add luajit.a lua.h luajit.h luaconf.h lualib.h lauxlib.h add Android.mk :
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS := libluajit.a LOCAL_ARM_MODE := arm TARGET_PLATFORM := armeabi-v7a TARGET_ABI := android-8-armeabi
LOCAL_MODULE := luajava LOCAL_SRC_FILES := luajava.c
include $(BUILD_SHARED_LIBRARY)
Step 4: Use NDK to build .so file
Step 5: How to use Luajava in activity: Simply view FirstLuaJavaAppActivity.java
But simply you can download everything here and modify your java code Reference : http://my.oschina.net/anwulac/blog/36828 http://luajit.org/install.html Make LuaAndroid : http://dotnetslackers.com/articles/mobile/Integrate-Lua-into-Your-Android-Games.aspx