Creating A Hello World Application In Android From Command Line

Note: Check the parent post here.

The first step is to create a Project. Projects are the repositories for the application’s source code, resource files, and other files necessary to build the application. There are three types of projects -

Android Projects – apart from storing the application’s source code and resource files, an Android project also contains the Ant build file and the Android Manifest file. This is the main application project and the contents from these are eventually built into a .apk file that is installed on the device or the emulator.

Test Projects – these contain code to test the application projects and can be installed on a device/emulator.

Library Projects – these contain the common utilities/source code and resources that need to be shared or referenced by the Android projects. These can be invoked at run time into the .apk file, but cannot be installed on a device/emulator.

For our purpose, we need to create an Android Project.

Step 1: Creating a Project without Eclipse


The command to create a project is:

creates the directories and files in the specified project directory, in this case $HOME_DIR/android/MyAndroidAppProject

Step 2: Creating the Hello World application


To create our first Android Application viz. the Hello World application, we will need to modify the code. Navigate to the src directory of the project. Edit the MyAndroidActivity.java file and make the changes as shown –

  1. With havin so much content do you ever run into any issues of
    plagorism or copyright violation? My blog has a lot of exclusive
    content I’ve either created myself or outsourced but it appears a lot of it is popping it up all over the internet without my agreement. Do you know any ways to help prevent content from being ripped off? I’d genuinely
    appreciate it.

    My web-site; android software development

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">