"android create project" Command Options

This section describes 'android create project' command options that you need to use to specify Java class package name, starting activity class name, project folder and Android platform target.

In previous tutorials, we have been following these steps to create some simple Android applications and test them on the emulator:

Now let's take closer look at some of these steps starting with the "android create project" command.

Here is the command I used to create my first Android application HelloAndroid:

C:\>cd \herong
C:\herong>\local\android-sdk-windows\tools\android create project \
   --package com.herongyang --activity HelloAndroid --target 2 \
   --path .\HelloAndroid

4 options are used in this command to help defining my application project:

You can try to create another application project with the short option names:

C:\herong>\local\android-sdk-windows\tools\android create project \
   -k com.test -a AndroidTest -t 2 -p .\AndroidTest

Created project directory: C:\herong\AndroidTest
Created directory C:\herong\AndroidTest\src\com\test
Added file C:\herong\AndroidTest\src\com\test\AndroidText.java
Created directory C:\herong\AndroidTest\res
Created directory C:\herong\AndroidTest\bin
Created directory C:\herong\AndroidTest\libs
Created directory C:\herong\AndroidTest\res\values
Added file C:\herong\AndroidTest\res\values\strings.xml
Created directory C:\herong\AndroidTest\res\layout
Added file C:\herong\AndroidTest\res\layout\main.xml
Created directory C:\herong\AndroidTest\res\drawable-hdpi
Created directory C:\herong\AndroidTest\res\drawable-mdpi
Created directory C:\herong\AndroidTest\res\drawable-ldpi
Added file C:\herong\AndroidTest\AndroidManifest.xml
Added file C:\herong\AndroidTest\build.xml
Added file C:\herong\AndroidTest\proguard-project.txt

You can delete the project folder C:\herong\AndroidTest and try it again with different option values.

In the next tutorial, we will review files and folders created by the "android create project" command.

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

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

 Android 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

"android create project" Command Options

 Android Project Folder Structure

 Android Application Project Build Process

 Project Build Process Done by "ant debug" Command

 Detailed Output of "ant -verbose debug" Command

 Output of "ant -verbose debug" - Android SDK R17

 "aapt" - Android Asset Packaging Tool

 "aapt package" Command - Resource Code Generation

 "javac" - Java Compilation Command

 "dx.bat --dex" Command - Converting .class Files into .dex File

 "apkbuilder" Command - Packaging and Signing .apk File

 "zipalign" Command - Aligning File Locations in .apk Package

 "aapt dump" Command - Printing Contents of .apk Package

 META-INF Files - Digests, Signature and Certificate

 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

 Archived Tutorials


 Full Version in PDF/EPUB