【Lesson 2】新建一个 android 项目 (create a new android project using eclipse and command line )

访问量: 1065

非常简单。参考:http://developer.android.com/training/basics/firstapp/creating-project.html

如果使用eclipse (Android Development Tool) 的话,就 New -> Android -> Android Application Project

如果使用命令行的话,就 $android list targets ,列出所有可用的目标,

siwei@siwei-Lenovo-V470c:/workspace/coding_tools$ android list targets
Available Android targets:
----------
id: 1 or "android-19"
     Name: Android 4.4.2
     Type: Platform
     API level: 19
     Revision: 3
     Skins: WQVGA432, WVGA800 (default), HVGA, WXGA720, WXGA800, QVGA, WSVGA, WXGA800-7in, WVGA854, WQVGA400
 Tag/ABIs : default/armeabi-v7a
----------
id: 2 or "android-20"
     Name: Android 4.4W
     Type: Platform
     API level: 20
     Revision: 1
     Skins: WQVGA432, WVGA800 (default), HVGA, WXGA720, WXGA800, QVGA, WSVGA, WXGA800-7in, WVGA854, WQVGA400, AndroidWearRound, AndroidWearSquare
 Tag/ABIs : android-wear/armeabi-v7a
----------
id: 3 or "Google Inc.:Google APIs:19"

然后 运行命令:

android create project --target  --name MyFirstApp \
--path /MyFirstApp --activity MainActivity \
--package com.example.myfirstapp

订阅/RSS Feed

Subscribe

分类/category