Android embedded Lua

Source: Internet
Author: User


As an embedded scripting language, Lua can be embedded into various environments. Next we will demonstrate how to embed Lua into Android.


Lua: the latest version 5.2.1
Http://www.lua.org/


The latest version of LuaJava, 1.1

Http://www.keplerproject.org/luajava/


I downloaded Lua5.2.1, and LuaJava1.1 compilation failed. LuaJava1.1 does not support Lua5.2.1 and supports up to Lua5.1. We can only use Lua5.1

You can directly synchronize the AndroLua project.
Https://github.com/mkottman/AndroLua

$ Git clone https://github.com/mkottman/AndroLua


1. Use ndk-build to compile Jni,
$ Cd jni

$ Ndk-build
After compilation, the so file is generated. Here, AndroLua/libs/armeabi/libluajava. so

2. Export the. jar file from LuaJava for use in the project.

If you do not want to compile, you can directly use the files that have been compiled.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.