Is developing an application for Android using Lua only possible?

前端 未结 7 498
小蘑菇
小蘑菇 2021-01-31 19:36

So I read this article on Mobile Orchard and, as I\'m planning on having my first steps in Android development, it got me thinking: is it possible to develop for Android in Lua

7条回答
  •  野的像风
    2021-01-31 19:58

    This may not be useful to the OP, however for other people interested in using lua to write their apps, I'd share my thoughts. So to answer the question:

    Yes, you can use only lua to write apps for android using LuaJava from the kepler project (though I don't believe its being maintained anymore). You can create and manipulate Java objects seemlessly, and interact with the Android APIs through lua. You can even create UI elements dynamically using just lua. However, a small amount of java bootstrap code is needed to start the lua VM from your app. The AndroLua project is a great place to start for Android. The creator has done a lot of work making lua work with Android and packaging it all into an app. From experience I can say it works great! However, I would in no way recommend this to a beginner, as it requires a lot of knowledge about java and lua to make things work, meaning more work not less.

    For AndroLua, just clone the repo and use that as a base for your own app. Last time I used it, I just imported it into android-studio, and after fixing a few problems with my own setup, had it compiling and running on my device.

提交回复
热议问题