If you do not have eclipse installed with the ADT plug-in, you can use the command line tool to create a project:
- Switch directory to Android SDK
Tools/
Directory.
- Run:
Android list targets
The console will display a list of available Android platforms that you have downloaded for the SDK. Find your target platform. Remember its ID. We recommend that you use the latest SDK version whenever possible. You can still generate an app for the old version. However, setting the latest version allows you to easily optimize your app on the latest Android device, and provides a better user experience.
If you do not see the device list, you need to install it using the android SDK manager tool. For more information, see step 1 of the Installation Wizard.
- Run:
Android Create project -- target <target-ID> -- name myfirstapp \ -- path <path-to-workspace>/myfirstapp -- activity myfirstactivity \ -- package com. example. MyApp
Replace it with the Platform ID you just wrote down<Target-ID>
(The ID obtained from the previous step) and replace it with your project save path<Path-to-workspace>
.
Now your project has been created and some default configurations have been made. Now you can start to develop the app. Continue
Next lesson.
Tip:AddPlatform-tools/
AndTools/
Directory to your environment variables
Path
.