To develop in Android you have to Download tow thinks:
- Eclipse: to code in java and use the intellisense (Crtl + space ) to facilitate your work.
- Android’s SDK that add to your environment the emulator in witch you execute the application as if you have a mobile with Android as OS.
First, you have to download eclipse from the official web site, from here. And you have to chose witch version of eclipse for your needs.
For me i have chosen Eclipse IDE for Java EE Dévelopers For Linux. You can chose other version for an other OS.
Second, you have to download the SDK of Android from here.
Now, you have to open unzip the ziped file of eclipse and run the executable into folder named eclipse. And do not forget to unzip the Android SDK if you have download it as a zip or a tgz file.
After choosing your workspace you have to install the plugin of Android into eclipse:
- go to help -> install new Software
- press Add And enter as a Name ” Android ” and as Location ” https://dl-ssl.google.com/android/eclipse/ “
- After same minutes, check all choices And press Next, And accept the licence.
- And finally, Click finish to let Eclipse download and install the plugin, After that, eclipse will ask you to restart it so accept that to restart eclipse.
Note: you can use MotoDev (As plugin Eclipse or an application installed like .exe in Windows ) to develop android easier. to know more about MotoDev and download it see here.
Now you are able to see this icons into your eclipse like that:
Now Create new Android project : press File -> New -> Android Project
After that use this parameters :
- Project name : HelloWorldAndroid
- SDK: Android 2.3 (because it is the most used until today), Note: you can use emulator for Android 4.0.3 to test your application if you need that.
- Package Name: tn.insat.houcine
- Create Aclivity: HelloWordActivity
- Minimum SDK: 10
And Android Project consists of:
- src : contains all java classes And Activities.
- gen : automatically generate
- res : contains all resources like layouts, values, images, …
That’s all for this tutorial you will see in other how to use layouts to create window in Android.