Creating Android Project with "android" Command
This section describes how to create an Android application project without using the Eclipse IDE. The 'android' command can be used to create a project with all the source code and directory stubs for your project, as well as an Apache Ant build file.
After installed Android SDK (Software Development Kit), JDK (Java Development Kit), and Apache Ant,
I think I am ready to develop my first Android application by following the tutorials given in the Android SDK package.
Based on the "Hello, World" tutorial provided in the Android tutorials,
There are 2 ways to create an Android application development project:
- Using the Eclipse IDE with the Android Eclipse plugin installed.
- Using the "android" command provided in the Android SDK package.
Since I don't have Eclipse installed on my system at this moment,
I will try to follow the "android" command example given in the Android SDK manual:
android create project \
--package com.example.helloandroid \
--activity HelloAndroid \
--target <id> \
If I understand correctly, the above command will:
- Create an application folder called HelloAndroid under the current folder.
- Create all sub folders and configuration files that are required by the build process.
- Create all Java stub source code for the application.
- Create an Ant build file that can be used to build the application.
Note that "--target <id>" allows us to specify which target Android platform this application is for.
See the next tutorial on how to identify a target platform.
Last update: 2015.
Table of Contents
About This Book
Installing JDK 1.8 on Windows System
Installation of Android SDK R24 and Emulator
Installing Apache Ant 1.9 on Windows System
►Developing First Android Application - HelloAndroid
►Creating Android Project with "android" Command
Listing Target Android Platforms
"HelloAndroid" - First Android Project
"HelloAndroid.java" - First Android Java Code
"ant debug" Command and Build Error
Building the Debug Binary Package
Installing the Debug Binary Package
Running the Debug Binary Package
Android Application Package (APK) Files
Android Debug Bridge (adb) Tool
Android File Systems
Android 4.0.3 File Systems
AboutAndroid - Application to Retrieve System Information
android.app.Activity Class and Activity Lifecycle
View Objects and Layout Resource Files
Using "adb logcat" Command for Debugging
Build Process and Package File Content
Building Your Own Web Browser
Android Command Line Shell
Samsung Galaxy Tab 3 Mini Tablet
USB Debugging Applications on Samsung Tablet
Android Tablet - LG-V905R
USB Debugging Applications on LG-V905R Tablet
Android Phone - LG-P925g
USB Debugging Applications on LG-P925g Phone
PDF Printing Version