Is developing an application for Android using Lua only possible?

前端 未结 7 487
小蘑菇
小蘑菇 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.

    0 讨论(0)
  • 2021-01-31 19:59

    Corona SDK allows you to write iOS and Android apps in Lua. Its very easy to learn, but its not free. Edit: I saw you posted that you found Corona just after I sent my post...

    0 讨论(0)
  • 2021-01-31 19:59

    You can try http://scormpool.com/luastudio Develop and run code on your device including iOS, Android, Mac, Win.

    Exporter can help you to make standalone app on listed above platforms.

    0 讨论(0)
  • 2021-01-31 20:03

    If only pure Lua then the answer is no.. unless you want to use a lot of libraries

    If you want to make little Android app/games then use a game engine, learning is a step by step process, don't dive straight into the hard part.

    0 讨论(0)
  • 2021-01-31 20:08

    I've been developing a mobile application in Lua to control robots remotely from iOS and Android phones. The app is in pure Lua and runs on top of Mosync platform using MobileLua. There is still some plumbing required, but it's not too complex.

    I also have a debugger and a Lua IDE (ZeroBraneStudio) that support debugging of Lua scripts running remotely (including MobileLua scripts running on Android or iOS devices). I provide a demo app you can use as a client to run simple scripts and check remote debugging in action.

    [Update] If you are interested in more game oriented options, there are several available: (1) already mentioned Corona SDK, (2) Moai, and (3) Gideros Mobile. There is also Marmalade Quick and Cocos2d-x Lua bindings (for example, quick-cocos2d-x). All these toolkits/frameworks allow to develop in Lua.

    Here is a detailed comparison of Moai vs. Corona.

    0 讨论(0)
  • 2021-01-31 20:18

    I know this is an older question, but just to correct some misinformation (in the comments) for people who come later, Corona SDK (as of spring 2013) has a Starter Edition which is free -- no splash screen or anything. The main difference between it and the "Pro" version is you can't do in-app purchases in the Starter Edition. But you can use it to create apps for sale, etc. No expiration date on it or anything.

    And in answer to the original question, learning Java may allow you to write Android apps, but if you then also want to target iOS you don't have any great options. By choosing something that's cross-platform from the beginning you can target Android or iOS or both. Lua (in any of the flavors already mentioned) is a great base language to learn for mobile development.

    0 讨论(0)
提交回复
热议问题