如何设置Android SDK中关于Linux命令行的发展? [英] How to set up android SDK for command line development on linux?
问题描述
我试图设置Android SDK来开发一个简单的程序在Linux操作系统(Ubuntu的9.10)在命令行上。我试着日食,但它知道在Ubuntu上运行的问题,所以我放弃了它。这是我到目前为止,完成的:
- 下载Android的sdk_r05-linux_86.tgz从<一个href="http://developer.android.com/sdk/index.html">http://developer.android.com/sdk/index.html
- 焦油xvzf的Android sdk_r05-linux_86.tgz
- 在LN -s Android的SDK-linux_86机器人
- 在.tcshrc文件添加SETENV PATH .....:/ home / user中/安卓/工具
- 在源.tcshrc文件
- 运行机器人。这开了一个图形用户界面。在可用的软件包:我安装了一切,并退出GUI 。
- 运行机器人名单目标',它列出了这些:
可用的Android的目标:
ID:1或机器人-3 产品名称:安卓1.5 类型:平台 API级别:3 修订:1 皮肤:HVGA-P,HVGA(默认),QVGA-P,QVGA-L,HVGA-L
ID:2或谷歌公司:谷歌的API:3 名称:谷歌的API 类型:加载项 供应商:谷歌公司 修订:3 说明:安卓+谷歌的API 基于Android 1.5(API级别3) 图书馆: * com.google.android.maps(maps.jar) 谷歌地图API 皮肤:QVGA-P,HVGA-L,HVGA(默认),QVGA-L,HVGA-P
ID:3或机器人-4 产品名称:安卓1.6 类型:平台 API级别:4 修订:1 皮肤:HVGA(默认),WVGA800,WVGA854,QVGA
ID:4或谷歌公司:谷歌的API:4 名称:谷歌的API 类型:加载项 供应商:谷歌公司 修订:2 说明:安卓+谷歌的API 基于Android 1.6(API等级4) 图书馆: * com.google.android.maps(maps.jar) 谷歌地图API 皮肤:WVGA854,HVGA(默认),QVGA,WVGA800
ID:5或机器人-6 产品名称:安卓2.0.1 类型:平台 API级别:6 修订:1 皮肤:WQVGA432,HVGA(默认),WVGA800,WVGA854,WQVGA400,QVGA ID:6 或谷歌公司:谷歌的API:6 名称:谷歌的API 类型:加载项 供应商:谷歌公司 修订:1 说明:安卓+谷歌的API 基于Android 2.0.1(API级别6) 图书馆: * com.google.android.maps(maps.jar) 谷歌地图API 皮肤:WQVGA400,WVGA854,HVGA(默认),WQVGA432,QVGA,WVGA800
ID:7或机器人-7 名称:Android 2.1系统 类型:平台 API级别:7 修订:1 皮肤:WQVGA432,HVGA(默认),WVGA800,WVGA854,WQVGA400,QVGA
ID:8或谷歌公司:谷歌的API:7 名称:谷歌的API 类型:加载项 供应商:谷歌公司 修订:1 说明:安卓+谷歌的API 基于Android 2.1(API级别7) 图书馆: * com.google.android.maps(maps.jar) 谷歌地图API 皮肤:WQVGA400,WVGA854,HVGA(默认),WQVGA432,QVGA,WVGA800
我要为我的摩托罗拉Droid创建一个简单的Hello World程序。其中这些目标,我应该使用?
我怎么看的皮肤?
如果我从它说,不存在任何虚拟设备在命令行中运行机器人。是虚拟设备相同的目标?
我如何得到一个机器人的皮肤和/或机器人的目标和/或机器人虚拟设备?
我想我需要运行像机器人创建的AVD --target 2 --name my_avd',但不能肯定。是否有如何做到这一点的地方一步一步的列表?
谢谢, 鲍勃·
之后:
我想通了,我要创建目标(=虚拟设备)是这样的:
安卓创建AVD -t -n 1
myavd1 .......
安卓创建AVD -t -n 8
myavd8
这给了我在GUI中8个虚拟设备,当我跑'机器人'的命令行。
有谁知道API级别/平台,使用什么Droid的?和在哪里得到正确的皮肤?有什么硬件规格,我需要知道Droid的发展?
最后,还有的步骤来创建在命令行(Linux)的一个Hello World应用程序,并在模拟器上运行它,然后在一个真正的手机上运行吗?任何名单
鲍勃·
要创建一个简单的Hello World 计划我摩托罗拉droid。哪 这些目标,我应该使用?
Droid的是通过股票的2.0(API 6),但由于2011年3月14号的2.2.2(FRG83G)的。您应该尽量为2.0,因为不是所有的机器人都2.2.2。
我怎么看的皮肤?
我如何得到一个机器人的皮肤和/或机器人的目标和/或机器人虚拟设备?
您需要安装皮肤的摩托罗拉Droid。 这里检查MOTODEV网站。
http://developer.motorola.com/docstools/tools/
如果我在命令运行'机器人' 行它说,不存在 虚拟设备。是虚拟设备 同样作为目标?
没有目标和虚拟设备是不同的。你需要从目标创建一个虚拟设备。
有谁知道API级别/ 平台使用的Droid的?和 从哪里得到正确的皮肤?在那儿 任何硬件规格,是 我需要知道的Droid的发展?
API等级:6或更高版本应该做的,因为不是所有的设备都更新
。规格:看到这里 http://developer.motorola.com/products/droid/
最后,是有步骤的任何名单 创建从一个Hello World应用程序 命令行(Linux的),并在运行 仿真器,然后在实际运行 手机?
去的Eclipse + Ubuntu的。其易于安装外观和插件也是如此。插件最好匹配物理设备。其他选项是使用繁琐的开发(像自己初学者)。问问你的疑惑在这里或张贴作为一个单独的问题。你肯定会得到生存。
HTC最近做了一个小的开发者指南中的命令行工具帮助。 请看看在这里 http://htcdev.com/devcenter/opensense- SDK /快速指南#楼
您也可以使用Eclipse + MOTODEV工作室...
http://developer.motorola.com/docstools/motodevstudio/
I'm trying to set up the android SDK to develop a simple program on the command line in Linux (Ubuntu 9.10). I tried eclipse, but it has know problems running on Ubuntu, so I gave up on it. Here's what I've done so far:
- downloaded android-sdk_r05-linux_86.tgz from http://developer.android.com/sdk/index.html
- tar xvzf android-sdk_r05-linux_86.tgz
- ln -s android-sdk-linux_86 android
- in .tcshrc added setenv PATH .....:/home/user/android/tools
- source .tcshrc
- ran 'android'. This opened a gui. Under available packages: I installed everything, and quit the gui.
- ran 'android list targets' and It listed these:
Available Android targets:
id: 1 or "android-3" Name: Android 1.5 Type: Platform API level: 3 Revision: 1 Skins: HVGA-P, HVGA (default), QVGA-P, QVGA-L, HVGA-L
id: 2 or "Google Inc.:Google APIs:3" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 3 Description: Android + Google APIs Based on Android 1.5 (API level 3) Libraries: * com.google.android.maps (maps.jar) API for Google Maps Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P
id: 3 or "android-4" Name: Android 1.6 Type: Platform API level: 4 Revision: 1 Skins: HVGA (default), WVGA800, WVGA854, QVGA
id: 4 or "Google Inc.:Google APIs:4" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 2 Description: Android + Google APIs Based on Android 1.6 (API level 4) Libraries: * com.google.android.maps (maps.jar) API for Google Maps Skins: WVGA854, HVGA (default), QVGA, WVGA800
id: 5 or "android-6" Name: Android 2.0.1 Type: Platform API level: 6 Revision: 1 Skins: WQVGA432, HVGA (default), WVGA800, WVGA854, WQVGA400, QVGA id: 6 or "Google Inc.:Google APIs:6" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 1 Description: Android + Google APIs Based on Android 2.0.1 (API level 6) Libraries: * com.google.android.maps (maps.jar) API for Google Maps Skins: WQVGA400, WVGA854, HVGA (default), WQVGA432, QVGA, WVGA800
id: 7 or "android-7" Name: Android 2.1 Type: Platform API level: 7 Revision: 1 Skins: WQVGA432, HVGA (default), WVGA800, WVGA854, WQVGA400, QVGA
id: 8 or "Google Inc.:Google APIs:7" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 1 Description: Android + Google APIs Based on Android 2.1 (API level 7) Libraries: * com.google.android.maps (maps.jar) API for Google Maps Skins: WQVGA400, WVGA854, HVGA (default), WQVGA432, QVGA, WVGA800
I want to create a simple hello world program for my motorola droid. Which of these targets should I use?
How do I see the Skins?
If I run 'android' from the command line it says that that there are no virtual devices. Is a virtual device the same as a target?
How do I get a droid skin and/or a droid target and/or a droid virtual device?
I THINK that I need to run something like 'android create avd --target 2 --name my_avd', but not sure. Is there a step-by-step list of how to do this somewhere?
thanks, Bob
Later:
I figured out that I had to create targets (=virtual devices) like this:
android create avd -t 1 -n myavd1
.......
android create avd -t 8 -n myavd8
This gave me 8 virtual devices in the gui when I ran 'android' from the command line.
Does anyone know what api level / platform to use for the Droid? And where to get the right skin? Is there anything hardware-specifications, that I need to know for Droid development?
Finally, are there any lists of steps to create a hello world app from the command line (linux) and run it on the emulator and then run it on a real phone?
Bob
want to create a simple hello world program for my Motorola droid. Which of these targets should I use?
Droid was by stock a 2.0 (API 6) but as of 14th March 2011 its 2.2.2 (FRG83G). You Should target for 2.0 because not all droids are 2.2.2.
How do I see the Skins?
How do I get a droid skin and/or a droid target and/or a droid virtual device?
You need to install Skins for Motorola Droid. Check the MotoDev Website here..
http://developer.motorola.com/docstools/tools/
If I run 'android' from the command line it says that that there are no virtual devices. Is a virtual device the same as a target?
No targets and virtual Devices are different. You need to create a Virtual Device from a Target.
Does anyone know what api level / platform to use for the Droid? And where to get the right skin? Is there anything hardware-specifications, that I need to know for Droid development?
API Level: 6 or Higher should Do because not all devices are updated.
Specifications: See here http://developer.motorola.com/products/droid/
Finally, are there any lists of steps to create a hello world app from the command line (Linux) and run it on the emulator and then run it on a real phone?
Go for Eclipse + Ubuntu.. Its easier to setup Skins and addons as well. Addons best match the physical device. Other options would be to use tedious for development(for a beginner like yourself). Ask you doubts here or post as a separate question. You would definitely get a respose.
HTC recently made a small guide for developers to help in command-line tools. Please take a look at it here http://htcdev.com/devcenter/opensense-sdk/quick-guide#building
You can also use Eclipse+ MotoDev studio...
http://developer.motorola.com/docstools/motodevstudio/
这篇关于如何设置Android SDK中关于Linux命令行的发展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!