Project for android

New to Moai? Get started here with our best tips and tutorials.

Moderator: naturally

Re: Project for android

Postby thebullno1 » Tue May 01, 2012 7:44 pm

chrisjohnson wrote:I am quite surprised that I have to jump through so many hoops, downloading Cygwin, Apache Ant, JDK, Android SDK, Moai, change some sh files, set up Path variables, environment variables and so on, just to generate an APK file that force closes ... This is so painful. We're here to develop Lua apps, not mess around with getting APK files compiled, right?


Moai is called "The mobile platform for pro developers" it never claims to be beginner friendly. And since you mentioned Corona, the only thing that Corona doesn't require is cygwin, you still need JDK and Android SDK. It's been a while since I last used Corona so I'm not sure about ant.

I'm not a Mac user, and when Windows users run into problems, I see comments on here like "buy a mac" -- so I'm ready to quit and go with corona which is actually working perfectly for me on Windows, but I don't like that it's not open, and I'm not into a yearly subscription.

I'm not sure who commented that. Lots of people here use windows and I am one of those. Moai even runs perfectly under Wine.
You don't want to hear my rant about how horrible Corona is.

Now back to the main part:

1. If I type "ant debug", in the build/project folder I get an apk but it gives me a force close error when trying it on all my test devices. I'm simply trying to build the basic sample folder that came with Moai.

Which version are you using? Try to view the logcat output with logcat *:S MOAILog:V AndroidRuntime:E. Saying force close is the same as saying "it doesn't work". It's not possible to help you.
moai-beta seems to have problems with ARMv6 devices so please upgrade to 1.0r3

2. If I type "ant release", in the build/project folder (with proper key_store settings), it compiles a release apk, but it won't install. I get this error when trying to install the APK: "Application not installed"

If debug doesn't work, release won't work.

If I were to make something like Moai, I'd make it work like this: "Give me your Lua file and I'll give you a working APK or IPA."

That's the ultimate goal isn't it? I'm sure Moai core teams and users want it too. Keep in mind that it's still 1.0. In terms of features, it already far surpasses many other engines especially Corona. Once you get your build system set up, building an apk is literally one double click. Remember that they already set their visions for Moai to be "for pro developers", novice friendliness is kind of a secondary goal here. That's something the community needs to fill in. Personally, I prefer command tools and scripts so I won't spend my time developing gui tools. However, if there's demand, some people (including me) might try to cash in.

I'd make a Java app (and an Objective C app) that loads and plays the Lua file

Check out MoaiNao in my signature. It may help you to run something on your device. Some script editing will be required but no cygwin or building of code is involved.
It's only for testing, for deployment you will still need to build an apk.
The same thinkg could be done on a jailbroken iOS device. I don't have the means to do it yet.

Does Rapanui do what I want, or am I too optimistic?

Rapanui is a high level framework to help coding with Moai. It doesn't cover building. What pyros posted is an app that loads stuffs from the sdcard and run, so you can prototype without building and the Rapanui framework is prepackaged.

Thanks for listening to my rant.

You're welcome and making a thread asking about your problem is always better than ranting.

PS: If you are not pro yet, get pro, it will take time but it's worth it. Some 14-15 year old kid mastered Moai and made a cloud-enabled game, what's your excuse? ;) .
User avatar
thebullno1
 
Posts: 302
Joined: Sat Jul 02, 2011 8:53 am

Re: Project for android

Postby chrisjohnson » Fri May 11, 2012 1:22 am

Thanks, I was not able to respond until today since by USB drivers bugged out. Anyways, I'll start a new thread with the logcat details.
chrisjohnson
 
Posts: 8
Joined: Tue May 01, 2012 6:07 pm

Previous

Return to New Users

Who is online

Users browsing this forum: No registered users and 0 guests

x