How To Create an Android App

Updated on: 2012-05-23 || Source: hackspc.com

If you have some basic Java knowledge, it’s quite easy to create a simple Android app. Technically, you don’t even have to have an Android smartphone, because you can run and test your app in an emulator. Nevertheless, having a smartphone is a better option.

Here is the list of things you need:

  • Eclipse IDE
  • Android ADT plugin for Eclipse
  • Android smartphone
  • Android SDK which matches the Android version on your smartphone

To create a simple Hello World app, follow these steps:

1)Download Eclipse

You can download Eclipse IDE at this linkhttp://www.eclipse.org/downloads/packages/eclipse-classic-372/indigosr2

2) Download Android ADT plugin

  1. Start Eclipse, then select Help > Install New Software….
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/
  4. Click OK
    Note: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you’ll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish.
    Note: If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.
  8. When the installation completes, restart Eclipse.

3)Download Android SDK

Make sure Eclipse is closed. On Windows 7, go to C:Usersandroid-sdks. Open “SDK Manager.exe”. On other systems android-sdks folder should also be in your home folder.

Download the SDK which matches the version on your phone.

4) Configure the phone

Other possibility is to use an emulator. But the main disadvantage of that possibility is slow loading: for every change you make in the source code and wish to test it, you have to wait 2-3 minutes (depending on your computer’s speed) for the emulator to load.

To configure your phone for testing, do as follows:

Setting -> Applications -> Development -> tick USB debugging

Then connect your phone to your PC with an USB cable.

5) Open a new Android project

Click File -> New Android project.

Enter the name of your project.

Choose the SDK that matches Android version on your phone.

Add a name of your package.

6) Add some code

ADT plugin has created the main activity for you. That code is executed when the application starts.

Delete this line:

setContentView(R.layout.main);

And add these 3:

TextView tv = new TextView(this); 
tv.setText("Hello, Android"); 
setContentView(tv);

Eclipse will prompt you to import the required library for TextView. Just click on the light bulb on the left and double click “Import ‘TextView’”.

7) Run the app

Click Run->Run or press Ctrl+F11.

Select your device.

And that’s it! Check your phone to see the results.

Other Tutorials

Fedora 17 Has Been Released, Download Now
Creating a user locked folder in Windows 7
Top 7 Plugins To Secure Your WordPress Blog
Download Ubuntu Secure Remix 12.04

SIGN UP FOR NEWSLETTER

Sign up to received our free newsletter!
Name:
E-mail ID:

MOST READ

Views: 5276 Times
Customizing Shortcut Keys of Word 2007 READ MORE
Views: 3003 Times
Apprentice loser Nick Holzherr gets funding for food site READ MORE
Views: 3023 Times
Google CEO says "nothing seriously wrong": source READ MORE
Views: 5553 Times
3 Simple Steps to Get Started With Tumblr READ MORE
Views: 7749 Times
Free Book Template Using Microsoft Word READ MORE

Home|IT News|Computer Tips|Video Tutorials|Download Softwares|Subjects|Contact Us
Copyright © 2019. Jumbo Education (Information Technology). All rights reserved.
Free counter and web stats

Large Visitor Globe