Pinterest Stumbleupon Whatsapp
Ads by Google

android application designWant to know how to write Google Android apps? Most Android applications are written in Java – a relatively easy to learn, friendly language for new developers. Aside from the possibility some money, you could actually contribute to the Android community. If you’ve got innovative ideas and the drive to see them spread, the Android market is for you! Let’s get you started on your very first Android application design.

Before we get to how to write Google Android apps – first, a bit of overview. Android apps (much like almost any mobile app) are developed on a computer – PC or Mac (generally) – and then compiled and sent to the device for testing. If you don’t have an Android device yet, there are emulators that simulate an Android device on your computer, meaning that you can still develop an Android game or application without owning one.

Step One: Download & Installation

First download and install the latest version of the Java JDK. Do not use the 64-bit version as it may cause you issues later on. Instead install the x86 version, with the default options.

Second, get the Android SDK – make sure to install the 32-bit ADT-Bundle version for Windows, even if you have a 64-bit system. That’s because everyone ends up complaining about the 64-bit version’s compatibility issues.

The Android application design bundle includes all the necessary components, including Eclipse. However, it’s not an installable file. You will unzip it to any directory desired. Keep in mind where you unzipped this file.

If you have any problems with Java, uninstall all versions and retry installation. If that fails, try the 64-bit version of the JDK and the ADT-Bundle, if you have a 64-bit system.

Ads by Google

Step Two: Configure The ADT-Bundle

First, start Eclipse, which is located within your ADT-Bundle within the Eclipse folder. If you are prompted to locate the Android SDK, you’ll have to manually find it from within your downloaded ADT-Bundle. It’s in the SDK folder.

android application design

Second, you’ll be prompted to set your workspace location — the default is good enough. If you have problems starting or configuring Eclipse, close Eclipse and delete your workspace, which is located wherever you placed it.

android application development

Third, click on the Android SDK icon in your toolbar in the ADT-Bundle.

android application development

You’ll be prompted to download additional material for the SDK. Download the following:

  • “Samples for the SDK”;
  • “Documentation for Android SDK”;
  • “Google APIs” for the 4.2 (API 17) package.

You might notice that you can also install material for older versions of Android. If you want, go nuts, but it will increase your download time and take up hard drive space. Next, click on “Install packages” in the lower-right hand side of the screen.

android application development

Fourth, check for updates to Eclipse by selecting “Help” from menu bar and choosing “Check for updates”.

Step Three: Set Up The Android Virtual Device (AVD)

First, click on the AVD (Android virtual device manager)  in the toolbar of the ADT interface. This creates a virtual device that lets you test your apps.

application development android

Second, you will configure the device in the following way:

  • Set “Device” as whatever smartphone you use. However, this is largely irrelevant and only refers to screen size. Because you will be emulating an Android device on your computer, if you have a smaller computer screen, you may want to choose a smaller vertical resolution handset.

application development android

  • Set “Target” as Android 4.2 API Level 17.
  • Check the box “Use Host GPU”, which will use your system’s GPU to speed things up a bit.

application development android

You may need to play around with the settings above, such as reducing the amount of RAM available to your emulator.

Third, you will choose the AVD from the list of existing devices and then hit the “Start” button in the right column. On the following pop-up menu, launch the device.

Don’t close the AVD once it launches, you will need it for the rest of this tutorial.

Step 4: Create a New Project

Navigate to ‘File -> New -> Android Project’.

After choosing to create a new Android application design project, you will be guided through several windows. Don’t worry about the content of these, you can simply choose the default value for all of them.

2013-06-03_13h53_03

However, for those of you interested in customizing the appearance of your app, there’s options to choose the Holo theme and Android launcher icon, as well as other options. However, these are cosmetic options. As long as you choose the correct SDK for the SDK that you downloaded, you’ll be OK.

2013-06-03_13h53_50

It will take several minutes to create the new project. You may want to grab a cup of coffee while you wait. After you get your coffee, here’s what you should see in the AVD window:

2013-06-03_12h20_52

Step 5: Configure The New Project

By default the new project contains the “Hello World” text. If you’ve ever programmed in Java (or most languages), one of the first projects that you work on is the ubiquitous “Hello World” application, which uses the Println(“Hello World”); to generate the text. However, the ADT-Bundle already includes this code — you will simply create a new file that will run within the AVD.

You will notice that the Eclipse window’s screen displays “Hello World”. You can choose to modify this text by manually clicking and dragging the words around the screen. Alternatively, once you’ve selected the text, you can modify the size, font and bold (and many other) characteristics.

To make the text bold, click on “Hello World”. In the right-side “Properties” panel, scroll down until you see “Text Style”. When you’re all finished making changes, save the file by clicking on the save icon in the toolbar up top.

2013-06-03_15h32_17

At this point, you are pretty much done building the app. Save it and go to the next step.

Step 6: Run Your Program

From the Package Explorer in the left-side of the screen, open up the src folder, then open the com.example.helloworld folder. Inside you will see the file “mainactivity.java”.

Next, select “mainactivity.java”.

Above your code, you’ll see a little green “Play” button (or navigate to ‘Run>Run‘). Click it. When a popup box asks you how to run the application, you’re going to tell it to run as an “Android Application”. It will prompt you to save changes; hit yes.

2013-06-03_18h03_35

Now you get to wait an eternity while your virtual device boots up. I’d recommend that you leave it open for the duration of your programming sprees, otherwise you’re going to spend more time watching the Android logo spin than you will watching your program freeze up. Just saying. Efficiency.

After everything’s done loading, your application should upload and start automatically. Which means that right after you “unlock” the device, you’ll be greeted with your first Android program.

android application design

That’s it, congratulations! The task can be a bit daunting at first, and definitely confusing, but if you stick with it you won’t be disappointed. If you step back and think about it, we only did a few really major things, the rest was just the process of connecting the pieces to make everything work.

Are you interested in Android application design? Do you want to become an Android developer? Have you ever written an Android app, and if so, what did it do? As always I love getting feedback in the comments section. As someone who answered yes to the first question, I’m in the process of learning to adequately code for my Android device, so do you have any websites or pointers that would help me or a fellow Android newbie out?

Updates to the Android Development Platform

Recently, Google released a preview edition of Android Studio, the first of its kind. When the final copy releases, developers will have access to a purpose built development kit for the Android operating system, instead of modified development environments.

The technology will likely eventually supplant Eclipse, and other SDKs. However, it hasn’t receive a release yet, so until then, we are stuck with Eclipse.

Additional Android Programming Reading and Tutorials

I strongly suggest checking out Alexander Tushinky‘s Android programming tutorial course, from Kickstarter.

MakeUseOf published a guide on using MIT’s Android App Creator, which allows individuals without a background in programming to get started building Android apps. The App Creator has its own quirks and learning curve. It’s good to start with, although you will more than likely want to eventually study Java and other languages. Ryan did a quick guide A Quick Guide To Developing Android Apps With Google App Inventor A Quick Guide To Developing Android Apps With Google App Inventor Read More to the Google version of the App Inventor, if you don’t feel like reading an e-book.

If you’re more interested in Android game, development, check out this article. And for those of you looking to read a discussion on the subject of easily programming for Android, check out our Answer section.

For those of you seeking additional coding lessons, Jessica wrote about three of the most important sources 3 Online Resources To Learn About Android Application Development 3 Online Resources To Learn About Android Application Development Much like Ryan (who attributed his curiosity with Android app development to his love for his Android handset), I have been on a quest to find out how to make and finish an Android app.... Read More on the net for Java tutorials. I highly recommend visiting the TheNewBoston’s YouTube channel.

  1. Marcel
    July 5, 2010 at 9:06 pm

    Works great! Only thing to emphasize, the emulator really, really, really takes a damn long time to start. First you see "A d r o i d", then after minutes the logo and minutes later the android desktop. So be patient trying the emulator out. Once started, keep it running otherwise you'll need to wait and wait and wait again...

  2. Sweetvani4u
    June 16, 2010 at 3:57 pm

    hello every one!!!!
    i have one problem, in android project if it have more than 1 activity than how to write project,
    in one project we write all activity?, or write different project for every different activity?

  3. Sweetvani4u
    June 16, 2010 at 1:57 pm

    hello every one!!!!
    i have one problem, in android project if it have more than 1 activity than how to write project,
    in one project we write all activity?, or write different project for every different activity?

  4. Goggletron
    June 7, 2010 at 5:44 am

    Thanks, this helped alot.

  5. Aibek
    May 6, 2010 at 6:28 pm

    Hey Hari

    Let us know how it goes :-)

    Aibek

  6. hari
    May 6, 2010 at 3:19 pm

    Hey Paul, that was very useful article. I bought htc hero months back thinking that i would have some fun programming, but never got myself to kickstart it..Now that i have something to start from..lets see how it goes..

    • Aibek
      May 6, 2010 at 4:28 pm

      Hey Hari

      Let us know how it goes :-)

      Aibek

  7. Garymol
    April 28, 2010 at 12:48 am

    Thanks a lot!!
    I was able to look for the bookmark you indicated and sent myself the article.

  8. Aibek
    April 24, 2010 at 1:38 pm

    The ShareThis bookmarklet at the end of the blog lets you save the
    article to pretty much any social bookmarking website (del.icio.us) or
    email it to yourself.

    Aibek

  9. Gary
    April 24, 2010 at 6:03 am

    I liked this article VERY MUCH. It got me all fired up about learning to program in Android. However, I wanted to save the article for future reference and I did not see a way to do this . Help!!

    • Aibek
      April 24, 2010 at 11:38 am

      The ShareThis bookmarklet at the end of the blog lets you save the
      article to pretty much any social bookmarking website (del.icio.us) or
      email it to yourself.

      Aibek

      • Garymol
        April 27, 2010 at 10:48 pm

        Thanks a lot!!
        I was able to look for the bookmark you indicated and sent myself the article.

  10. PaulB2
    April 22, 2010 at 2:42 pm

    I've looked everywhere and can't find a solution for you. Your best bet might be to restart the process or try from another computer. Are you doing this on windows or mac?

    You have to make sure you do the steps in order because some of them depend on each other to work.

  11. PaulB2
    April 21, 2010 at 9:07 pm

    You need to know Java Programming [at least some of it] to write apps using the method in this article. Plus, there are some differences in the framework and how things need to be written for an Android device as opposed to, say, a PC. There's books out there covering what you need to know--but I'd be happy to give it a go in an article if you want.

    Anything specific you want to see? I'd be happy to write another [related] article if there's interest.

  12. Jeremy
    April 21, 2010 at 6:49 pm

    Hey Paul, thanks for a great article, to at least to give me starting point but my question is- how do you write a app? Ive got some great ideas (well...in my mind atleast.) but I dont know how to write code for them. Is there a future article on this?

    • Paul Bozzay
      April 21, 2010 at 7:07 pm

      You need to know Java Programming [at least some of it] to write apps using the method in this article. Plus, there are some differences in the framework and how things need to be written for an Android device as opposed to, say, a PC. There's books out there covering what you need to know--but I'd be happy to give it a go in an article if you want.

      Anything specific you want to see? I'd be happy to write another [related] article if there's interest.

  13. Alex
    April 20, 2010 at 8:48 pm

    Thank you for the help, unfortunately i still havent gotten it working. Eclipse claims there is no repository, and occasionally it will simply say "there are no categorized items."

    • Paul Bozzay
      April 22, 2010 at 12:42 pm

      I've looked everywhere and can't find a solution for you. Your best bet might be to restart the process or try from another computer. Are you doing this on windows or mac?

      You have to make sure you do the steps in order because some of them depend on each other to work.

    • eegor
      April 24, 2010 at 10:34 pm

      Hey Alex, you should be able to download the plugin seperately from here: http://developer.android.com/sdk/eclipse-adt.html#troubleshooting. Hope that helps.

      There are also some good 'getting started' tutorials at http://androidforbeginners.blogspot.com.

  14. kumarann
    April 19, 2010 at 2:21 pm

    The step by step procedure has been explained in the greater way as started with welcome message “Hello Android” like Java programming introduction.
    the wonderful option in android development is that everything will be available in open source. No need to pay for anything.
    I want Android to be the number one in the World in mobile application in the nearest future.

  15. kumarann
    April 19, 2010 at 12:21 pm

    The step by step procedure has been explained in the greater way as started with welcome message “Hello Android” like Java programming introduction.
    the wonderful option in android development is that everything will be available in open source. No need to pay for anything.
    I want Android to be the number one in the World in mobile application in the nearest future.

  16. PaulB2
    April 19, 2010 at 2:18 pm

    You most likely have a firewall blocking the download--you've got two options.

    You can configure Eclipse to use your web browser's proxy settings, or download the package manually. Because the proxy settings option is a bit more difficult, here's the second option:

    http://developer.android.com/s...

    See the part where it gives you the ADT package install .zip file, and follow steps 1-6 below that. Let me know if it works!

  17. Nevadascott
    April 18, 2010 at 5:59 pm

    Thanks so much! this is a great way to get a start! Would like to see more!!!

    • Paul Bozzay
      April 19, 2010 at 12:19 pm

      Thanks for the feedback; anything in particular you want to see?

  18. Scott
    April 18, 2010 at 7:58 pm

    In order to do this you have to go to the "settings" on the left side and put a check mark in the "Force https//..." box.
    Then it will be fine

  19. Alex
    April 17, 2010 at 2:58 pm

    Anyone else getting errors when trying to connect to the software site via eclipse?? removing the 's' doesn't make a difference.

    • Vinod
      April 18, 2010 at 12:19 am

      I'm facing the same trouble, can anyone help?

    • Scott
      April 18, 2010 at 5:58 pm

      In order to do this you have to go to the "settings" on the left side and put a check mark in the "Force https//..." box.
      Then it will be fine

      • Alex
        April 18, 2010 at 9:03 pm

        sorry, i don't see "settings" anywhere in eclipse

        • Paul Bozzay
          April 19, 2010 at 12:18 pm

          You most likely have a firewall blocking the download--you've got two options.

          You can configure Eclipse to use your web browser's proxy settings, or download the package manually. Because the proxy settings option is a bit more difficult, here's the second option:

          http://developer.android.com/sdk/eclipse-adt.html#troubleshooting

          See the part where it gives you the ADT package install .zip file, and follow steps 1-6 below that. Let me know if it works!

  20. Mark O'Neill
    April 17, 2010 at 2:27 pm

    As an Android owner, I can personally attest that the Android Market is completely full of junk. Yes, there are the good apps too but they are hard to find because they are drowned out by all the crap. Google should have some kind of review procedure in place, much like Apple does, to remove all the crap clogging up the system.

    • Chris
      June 4, 2010 at 8:42 am

      Which would completely miss the point of Android being Free, and negate any advantages over the iPhone.

  21. Steven Hope
    April 17, 2010 at 2:18 am

    Fantastic article! I was following using OSX but still managed it. Another example of why I love makeuseof.com. (My Hello World app http://twitpic.com/1g47pu)

  22. Steven Hope
    April 16, 2010 at 4:18 pm

    Fantastic article! I was following using OSX but still managed it. Another example of why I love makeuseof.com. (My Hello World app http://twitpic.com/1g47pu)

    • Steven Hope
      April 16, 2010 at 4:36 pm

      huh...oops. remove the ) from the url

    • Paul Bozzay
      April 19, 2010 at 12:16 pm

      Thank you! Always great to hear someone found something useful. Love the pic ;)

Leave a Reply

Your email address will not be published. Required fields are marked *