Sunday, March 24, 2013

Android Developer Tools (ADT) Bundle for Windows

Android - Building Your First App


1) This tutorial is based on 
http://developer.android.com/training/basics/firstapp/creating-project.html.

2) The Integrated Development Software used for this tutorial (ADT) is downloadable from 
http://developer.android.com/sdk/index.html#download (32 bit edition).

3) Download and extract the ADT software at the step (2). The top-level directory is as shown below:


4) Go into eclipse directory and locate Eclipse executable file.


5) Run eclipse.exe. An ADT Splash Screen pops up.


6) A Workspace Launcher dialog box appears. Set your Workspace directory, preferably "../workspace") which means it is located at top level of the ADT directory. Optionally, Tick "Use this ad the default and do not ask again".


7) Click Menu/Help/About ADT.


8) The About ADT window pops up.
A number of installed components are shown as icons. The green icons are those related to Android Development kit.
Checking the installed components is necessary during the first time running of Eclipse to ensure that you have the required Android Development kit. Without these, you cannot use Eclipse to build Android apps.
Click OK.


CREATING AN ANDROID EMULATOR

9) Before you develop an Android app, you need to setup an Android Emulator so that you can test your app on it.
10) Click Menu Window/Android Virtual Device Manager.


11) Set the machine configuration.
11.1) Click "Edit..."
11.2) Enter the required details. Click OK.
11.3) To test the machine, click Start…


12) Set Launch options.
12.1) Accept the default and click Launch.


12.2) The Starting progress windows pops up.


12.3) The Android emulator starts loading.


12.4) You have to wait for logon screen to appear. Use your mouse to tap on the padlock icon and drag it to the right to unlock the machine.


12.5) Look at the title of the window, 5554:WQVA33
5554 is the port number of the emulator that allows it to communicate with other software.
WQVA33 is the name given in Step (11).

13) You can leave this emulator window open while building the app.

CREATING NEW ANDROID PROJECT

14) Click Menu File/New/Android Application Project






15.1) The explanation as stated on the above website:
  • Application Name is the app name that appears to users. For this project, use "My First App."
  • Project Name is the name of your project directory and the name visible in Eclipse.
  • Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organizationor publisher entity. For this project, you can use something like "com.example.myfirstapp." However, you cannot publish your app on Google Play using the "com.example" namespace.
  • Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting Different Platform Versions). Leave this set to the default value for this project.
  • Target SDK indicates the highest version of Android (also using the API level) with which you have tested with your application.
As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.
  • Compile With is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.
  • Theme specifies the Android UI style to apply for your app. You can leave this alone.
15.2) Click Next.
16) Configure New Android Application Project.
16.1) Click Menu Window/Android Virtual Device Manager.
16.2) Accept the default configuration and click Next.
17) Configure Launcher Icons.
17.1) Accept the default and click Next.
18) Create Activity.
18.1) Accept the default (Create Activity/Blank Activity) and click Next.
19) Set options for New Blank Activity
19.1) Accept the default and click Next.
20) Project Created
20.1) Look at the Package Explorer Panel. The file activity_main.xml is highlighted.
20.2) Look at the Design Panel. The draft of the application screen layout is shown.
20.3) Notice the text "Hello world!" at the center of the screen layout.
21) The project creation is done. 


RUNNING APP ON EMULATOR

22) Right-click the Project Name. Select Run As/Android Application.
23) The app is launched to the emulator.
23.1) Notice that the look of the app screen is similar to the layout in Step (20)
23.2) Notice the name "My First App"


24) Click Return Button to exit from My First App.

31 comments:

  1. Nice post.Give it up. Thanks for share this article. For more visit:Web App Development

    ReplyDelete
    Replies



    1. TOO BAD, the links provided above are not working. I tried it and just a suggestion, do not waste your time guys! Good news is that, I already found the real file, after some searching all around. I want to ease your burden looking, so I am just giving you the real download link.


      CLICK THIS LINK TO DOWNLOAD THE FULL FILE

      CLICK THIS LINK TO DOWNLOAD THE FULL FILE


      I JUST WISH YOU HAVE A GREAT DAY AND ENJOY! HOPE I REALLY HELPED :)

      Delete
  2. Your Article Give Many Information about a Moodle Development. Thanks for Sharing This Post
    Moodle Development

    ReplyDelete
  3. Thanks for sharing your knowledge in Android development. Nice information about creating android SDK. Android Developer

    ReplyDelete
  4. I followed as mentioned above.But for some reason when i click run->run as->Android Application, the emulator doesn't start. Can anyone please help?

    ReplyDelete
    Replies
    1. Did you follow step 9 and 10?
      Did the emulator run well?

      Delete
    2. i got the same problem too..

      Delete
    3. Follow Step 10.
      Let the emulator run at the back. Don't shut it down.
      Proceed to Step 11.
      Type your code.
      Click Run As Android Application.
      Since the emulator is running at the back, you don't have to start it anymore.
      Check via DDMS perspective to see whether Eclipse is able to detect your emulator.

      Delete
  5. Skysoft provides Computer Support, IT Management, and Cloud Management. From complete building cabling to complex software development,Android Development.

    ReplyDelete
  6. I follow all these steps but I got the error

    Starting emulator for AVD 'WQVGA33'
    Failed to create Context 0x3005
    emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
    Failed to allocate memory: 8
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.


    Please help..

    ReplyDelete
    Replies
    1. It could be a machine/windows-specific problem. I suggest that you try running on other machines and see if it works.

      Delete
  7. BUT I HAVE MOBILE OF ANDRIOD 2.2 SO WHAT CHANGES I SHOULD DO IN THE ABOVE STEPS? OR DO THE SAME?

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. @Bilal,

    Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting Different Platform Versions). Leave this set to the default value for this project.

    Target SDK indicates the highest version of Android (also using the API level) with which you have tested with your application.
    As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.


    Compile With is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.

    Regards,
    ScienceUncle. (www.scienceuncle.com - Malayalam Science Portal)

    ReplyDelete
  10. step 6, 8 and step 12 image is not preview. what should i do

    ReplyDelete
    Replies
    1. Alternatively, read this, http://android-steps.blogspot.com/2014/02/android-eclipse-build-your-first-app.html

      Delete
  11. Hey…how can you write so well? My children are gaga over your colorful website. My teenage daughter wants to sell her `dance moves’ online and my younger son is recording his rock ‘n roll compositions. Thanks for your idea on making money by posting talents that each one of us have in some form or the other. As per your suggestions, my family as a whole (including hubby dear) have posted what we have to offer on buy best inphographics online,unique logo design websites. I think a `family that blogs together, also stays together’.

    ReplyDelete
  12. Obviously this is amazing blog! You are too smart person to deal with this kind of issues! best reviews for protect america security

    ReplyDelete
  13. I cannot find Android Virtual Device Manager In Window on Eclipse.....Help me..

    ReplyDelete
  14. Did you know that that you can earn cash by locking special areas of your blog / website?
    To begin just join Mgcash and add their Content Locking tool.

    ReplyDelete

  15. I really liked this information,And now is time to use it,
    Shopify Connector

    ReplyDelete
  16. Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.
    Best Android Training in Velachery | android development course fees in chennai

    ReplyDelete
  17. It's interesting that many of the bloggers your tips helped to clarify a few things for me as well as giving... very specific nice content.|Android Training institute in chennai with placement | Best Android Training in velachery

    ReplyDelete
  18. We will share useful post In the information update for plugins for images, I searching for many useful technologies in your site.Dot Net Training in Chennai | Dot Net Training Institute in Chennai | .Net Training in Chennai

    ReplyDelete
  19. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.
    Android Training in chennai | Android Training

    ReplyDelete
  20. This is a great post, you have cleared my many concepts. One who has interest in Linux can follow you and i think he will get lot of benefits.
    I am providing hosting in pakistan | web hosting in pakistan

    ReplyDelete