Topics

Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Wednesday, July 20, 2011

Android first App

In the last post i show how to configure the environment to program for Android.
First of all open the Eclipse and click in File>New>Andorid Project


Choose a project name, the build target and fill the properties like this


Click in Finish
Don't be alarmed if you see some error in the project. It's normal. Will fix in some seconds.
Click on   and this window will open
Click in new and fill the fields like this.
Choose the same target you did before. The min SD Card is 9mb. You must define this for install your app.

Click in Create AVD.
After ckick in the create avd and start...
I recommend you to check Scale display to real size.
For my 15'' monitor i use 6
Wipe user data clear the AVD. Dont check everytime


Click in Launch.
The emulator boot take some time.
Another coffee!
I realy love coffee :)


Now just click in play button and select Android Application

Done! Your app is running
The good news is that you don't need to restart the emulartor every time. You just need to run the project again.
In teh next post i'll explain the code of the Hello World App.
Enjoy

Intalling Android SDK on Eclipse - Windows and Ubuntu

Today i'll show how intall the Android SDK on Eclipse for Windows 7 and Ubuntu.
The first thing is to download the Eclipse for your operational system.
Go to http://www.eclipse.org/downloads/ and choose the right link.

Windows:

Ubuntu:




Unzip the Eclipse file and put in some place you like.

After this download  the Android SDK at http://developer.android.com/sdk/index.html
For windows download the zip file, not the windows installer (i'll explain below)
For Ubuntu download the tar.gz.
Now came an important step
Unzip the SDK to a folder without any blank spaces. Windows intaller will put in "C:\program files\Android".
The ADT (Android Development Plugin) for eclipse have a bug. It can't start the emulator if the SDK is in a folder with spaces.
Done so, open the eclipse and go in Help>Install new software.Click in Add, and put a name as Android or anything. In Location put https://dl-ssl.google.com/android/eclipse/
Check teh box in Development Tools, Next and Finish.
Now you just have to install the packages for what versions of Android you want develop.
I downloaded all.
Click in this icon  and go in Avaliable packages. Check any boxes and click in install selected.
Check accept all and install.
Go take some coffees

Afer a lot of instalation hours you are ready to program for Android :)
I next  post i'll show how to set the first android project an test it on emulator and phone.