Page 1 of 1

developing for Android on a mac

Posted: Sun May 13, 2012 4:04 am
by GPJMA
Hello all. I have done a bit of work with Live-code on Apple devices but recently purchased Live-code for Android.
I looked at the tutorials for getting started on Android with a mac but the tutorial only shows the windows screens not the methodology for mac.
I have written a few apps for android and am used to using the simulator etc on a PC but not on my mac.
Is it possible to get some instruction on actually setting up my mac laptop to develop for Android. Especially the simulator.
I am afraid I am not too bright with the console (been spoilt by windows i guess)
Thanks all for any assistance.
Grahame

Re: developing for Android on a mac

Posted: Sun May 13, 2012 11:05 am
by Mark
Dear Grahame,

Download the Android SDK for Mac. Move it to a convenient place (e.g. your Home directory) and unzip it. The file ....android-sdk-macsx/tools/android should look like a tiny terminal window. If it doesn't, then open the terminal window, type "sudo chmod -R 755", drag the folder "tools" into the terminal window and type return. Now you can double-click aforementioned file to make it run in the terminal.

The Android SDK Manager will appear. Use the SDK to download Android-2.3.3 and 4.0. Choose "Manage AVD's" from the Tools window. In the "Manage AVD's" window, click on New. Give the new AVD a name (e.g. Android 2.3.3) and set the target to Android 2.3.3. Set the size of the SD card to e.g. 250MB. Enable Snapshot (this is essential). Set the Skin to default. Click "New" next to the Hardware section and set the Device ram size to at least 256MB.

Click on the Start button in the ADV manager. Make sure that Launch from snapshot is active and Save to snapshot too. Now click the Launch button.

Once Android has started up, you should see your Android device in the Test menu of the Development menu of LiveCode. Choose the Android platform in the Standalone settings of your stack and choose the Android device from the menu to test your stack in the emulator.

Kind regards,

Mark

Re: developing for Android on a mac

Posted: Sun May 13, 2012 9:11 pm
by GPJMA
Many thanks Mark
I will try that.
I do appreciate the assistance.
Cheers
Grahame

Re: developing for Android on a mac

Posted: Tue May 15, 2012 1:06 am
by GPJMA
Mark
When I click on the zip file for android-sdk-macosx it unzips and displays these folders
add-ons
platforms
SDK Readme.txt
tools

when I open the tools folder I get access to a whole list of files including
android
Clicking on this runs the Android SDK Manager and I have got to this before and loaded the platforms etc that I need.
From here I cannot get to the AVD manager.

When you say drag the tools into the terminal window....which one?
I get a term window open for the SDK manager and one when I open android.

hope you can straighten me out Mark.
Cheers
Grahame

Re: developing for Android on a mac

Posted: Tue May 15, 2012 1:13 am
by Mark
Hi Grahame,

It seems that you do evreything correctly up to the point where the Android SDK Manager opens. Here, you first need to install the SDK that you want to use and after that you can choose AVD Manager from the menubar.

Kind regards,

Mark

Re: developing for Android on a mac

Posted: Tue May 15, 2012 11:29 pm
by GPJMA
Hello again Mark
No matter what I do I am not getting to the AVD manager. I can open the SDK manager and load the required platforms etc but there is no way to get to the AVD.
If I click on the AVD file in the android folder it opens a term window and tells me I need to state the name of the Emulator etc??
I do not know whats going on with this.
In windows its a breeze. I still want to know why the tutorial for using live code for Android on a mac uses the windows set up???
Anyway thanks for your help.
Grahame

Re: developing for Android on a mac

Posted: Wed May 16, 2012 2:05 am
by Mark
Hi Grahame,

You misunderstood my previous posts. You have to double-click on the Android command line tool, in the Tools folder, only once. This is the only executable you need to click on. You will not open anything else from the Finder. Just the Android command line tool. It will start in the Terminal.

Once you see the SDK Manager and you have downloaded the necessary SDK's using this SDK Manager, you can start the AVD Manager from the menu bar. It is really super obvious, since there is a menu item that says "Manage AVD's..." in the Tools menu. So, this is the menubar. Not a folder. Forget about folders and files here. Just start the AVD Manager from the Tools menu. Not the Tools folder, since there simply is no AVD Manager in the Tools folder, but there is one in the Tools menu in the menu bar of the SDK Manager.

From there, you can just follow the steps that I already wrote in my previous post.

Kind regards,

Mark