我在android开发</targetid>中为<targetid>添加了什么?

时间:2014-04-15 17:46:36

标签: android linux

我试图用命令行工具创建android项目,这是我到目前为止所做的。

将目录更改为Android SDK的工具/路径。

执行:

android list targets

关注输出:

Available Android targets:
----------
id: 1 or "android-19"
 Name: Android 4.4.2
 Type: Platform
 API level: 19
 Revision: 3
 Skins: WXGA800-7in, HVGA, WSVGA, QVGA, WQVGA432, WXGA720, WXGA800, WQVGA400, WVGA800       (default), WVGA854
 Tag/ABIs : default/armeabi-v7a, default/x86
 ----------
 id: 2 or "Google Inc.:Google APIs x86:19"
 Name: Google APIs x86
 Type: Add-On
 Vendor: Google Inc.
 Revision: 4
 Description: Android + Google APIs x86
 Based on Android 4.4.2 (API level 19)
 Libraries:
  * com.google.android.media.effects (effects.jar)
      Collection of video effects
  * com.android.future.usb.accessory (usb.jar)
      API for USB Accessories
  * com.google.android.maps (maps.jar)
      API for Google Maps
 Skins: WSVGA, WXGA720, WVGA800 (default), HVGA, WVGA854, WQVGA400, QVGA, WXGA800,   WQVGA432, WXGA800-7in
 Tag/ABIs : default/x86
 ----------
id: 3 or "Google Inc.:Google APIs:19"
 Name: Google APIs
 Type: Add-On
 Vendor: Google Inc.
 Revision: 4
 Description: Android + Google APIs
 Based on Android 4.4.2 (API level 19)
 Libraries:
  * com.google.android.media.effects (effects.jar)
      Collection of video effects
  * com.android.future.usb.accessory (usb.jar)
      API for USB Accessories
  * com.google.android.maps (maps.jar)
      API for Google Maps
 Skins: WSVGA, WXGA720, WVGA800 (default), HVGA, WVGA854, WQVGA400, QVGA, WXGA800, WQVGA432, WXGA800-7in

标签/ ABI:默认/ armeabi-v7a

执行:

android create project --target <target-id> --name MyFirstApp \
--path <path-to-workspace>/MyFirstApp --activity MainActivity \
--package com.example.myfirstapp

输入:

android create project --target <3> --name MyFirstApp --path <path-to-workspace>/MyFirstApp --    activity MainActivity --package com.example.myfirstapp

响应:

bash: syntax error near unexpected token `3'

我为目标ID添加了什么?我已经尝试了数字和“”

中的内容

1 个答案:

答案 0 :(得分:0)

点击此链接:http://developer.android.com/tools/projects/projects-cmdline.html。我想你需要删除&#34;&lt; &GT;&#34;来自目标号码。