当前位置:首页 > 工业控制 > 电子设计自动化
[导读]作者:岳峰,华清远见嵌入式学院讲师。 更新了android 1.5 sdk后,首先会遇到一个棘手问题,模拟器启动不了,控制台报“Failed to find an AVD compatible with target”错误。解决办法如下: 进入1.5 sdk目录下,-

作者:岳峰,华清远见嵌入式学院讲师。

更新了android 1.5 sdk后,首先会遇到一个棘手问题,模拟器启动不了,控制台报“Failed to find an AVD compatible with target”错误。解决办法如下:

进入1.5 sdk目录下,->tools->敲入命令“./android create avd -n my_android1.5 -t 2 ”,注意,win系统,无需前边得./ ,会创建出“my_android1.5” avd文件,然后到ide环境下,run一个项目,系统提示选择一个avd ,选择你刚刚创建得“my_android1.5”,即可。以下是操作截图

这里我创建了三个avd,分别对应1.5 1.1 googleApi

一个很酷得功能在创建avd文件得第二步,控制台提示“是否自定义自己得设备”,默认选项是"no",如果输入 "y",接下来可以一步步根据提示,定制自己得模拟器性能参数。比较有意思,参数表如下:

Characteristic

Description

Property

Device ram size

The amount of physical RAM on the device, in megabytes. Default value is "96".

hw.ramSize

Touch-screen support

Whether there is a touch screen or not on the device. Default value is "yes".

hw.touchScreen

Trackball support

Whether there is a trackball on the device. Default value is "yes".

hw.trackBall

Keyboard support

Whether the device has a QWERTY keyboard. Default value is "yes".

hw.keyboard

DPad support

Whether the device has DPad keys. Default value is "yes".

hw.dPad

GSM modem support

Whether there is a GSM modem in the device. Default value is "yes".

hw.gsmModem

Camera support

Whether the device has a camera. Default value is "no".

hw.camera

Maximum horizontal camera pixels

Default value is "640".

hw.camera.maxHorizontalPixels

Maximum vertical camera pixels

Default value is "480".

hw.camera.maxVerticalPixels

GPS support

Whether there is a GPS in the device. Default value is "yes".

hw.gps

Battery support

Whether the device can run on a battery. Default value is "yes".

hw.battery

Accelerometer

Whether there is an accelerometer in the device. Default value is "yes".

hw.accelerometer

Audio recording support

Whether the device can record audio. Default value is "yes".

hw.audioInput

Audio playback support

Whether the device can play audio. Default value is "yes".

hw.audioOutput

SD Card support

Whether the device supports insertion/removal of virtual SD Cards. Default value is "yes".

hw.sdCard

Cache partition support

Whether we use a /cache partition on the device. Default value is "yes".

disk.cachePartition

Cache partition size

Default value is "66MB".

disk.cachePartition.size

这个工具得其他操作方法:

Usage:
android [global options] action [action options]

Global options:
-h --help This help.
-s --silent Silent mode: only errors are printed out.
-v --verbose Verbose mode: errors, warnings and informational messages are pr
inted.

Valid actions are composed of a verb and an optional direct object:
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- create avd : Creates a new Android Virtual Device.
- move avd : Moves or renames an Android Virtual Device.
- delete avd : Deletes an Android Virtual Device.
- update avd : Updates an Android Virtual Device to match the folders of a ne
w SDK.
- create project: Creates a new Android Project.
- update project: Updates an Android Project (must have an AndroidManifest.xml).

Action "list ":
Lists existing targets or virtual devices.
Options:
No options

Action "list avd":
Lists existing Android Virtual Devices.
Options:
No options

Action "list target":
Lists existing targets.
Options:
No options

Action "create avd":
Creates a new Android Virtual Device.
Options:
-t --target Target id of the new AVD [required]
-c --sdcard Path to a shared SD card image, or size of a new sdcard for the
new AVD
-p --path Location path of the directory where the new AVD will be created

-n --name Name of the new AVD [required]
-f --force Force creation (override an existing AVD)
-s --skin Skin of the new AVD

Action "move avd":
Moves or renames an Android Virtual Device.
Options:
-p --path New location path of the directory where to move the AVD
-n --name Name of the AVD to move or rename [required]
-r --rename New name of the AVD to rename

Action "delete avd":
Deletes an Android Virtual Device.
Options:
-n --name Name of the AVD to delete [required]

Action "update avd":
Updates an Android Virtual Device to match the folders of a new SDK.
Options:
-n --name Name of the AVD to update [required]

Action "create project":
Creates a new Android Project.
Options:
-k --package Package name [required]
-n --name Project name
-a --activity Activity name [required]
-t --targetTarget id of the new project [required]
-p --path Location path of new project [required]

Action "update project":
Updates an Android Project (must have an AndroidManifest.xml).
Options:
-t --target Target id to set for the project [required]
-p --path Location path of the project [required]

-n --name Project name

“本文由华清远见http://www.embedu.org/index.htm提供”



来源:华清远见1次

本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除。
换一批
延伸阅读

电池模拟器的作用是取代现有的电池,模拟真实电池的输出状态和电池的充放电特性,并可以按用户的需要,随时改变多种条件,快速验证待测设备在不同电池条件下的响应。

关键字: 电池 模拟器 充放电特性

在不断追求创新的旅程中,ITECH艾德克斯于2024年3月29日正式发布标志着图形化直流电源新纪元的IT6600直流电源系列。该系列产品不仅象征着技术创新的新里程碑,而且设定了易操作性与环境友好理念的新标准。IT6600...

关键字: 可编程直流电源 模拟器

罗德与施瓦茨与SmartViser携手开发了一种用于测试符合欧盟销售的智能手机和平板电脑的新Energy Efficiency Index(EEI)标签法规的解决方案。该解决方案的核心是R&S CMX500,这是...

关键字: 智能手机 Android iOS

ETS-Lindgren和罗德与施瓦茨继续长期合作,为5GNR提供了具有全面辅助全球导航卫星系统(A-GNSS)功能的天线性能测量,R&SCMX500OBT宽带无线通信测试仪和R&S SMBV100B GNSS模拟器,结...

关键字: 天线 5G NR 模拟器 信号发生器

(全球TMT2023年8月24日讯)2023年8月23日,时值实时3D引擎Unity在华设立合资公司Unity中国一周年之际,Unity中国正式推出Unity中国版引擎——团结引擎。Unity全球CEO John Ri...

关键字: UNITY CE Android 开发者

报告显示:全球电商 App 获客花费接近50亿美元 北京2023年8月23日 /美通社/ -- 全球营销衡量与体验管理平台 AppsFlyer 近日发布《2023 电商 App 营销现状报告》。尽管面临全球经...

关键字: APPS BSP iOS Android

数字机顶盒是一种数字技术下的多媒体娱乐中心,可以实现电视节目接收、播放、存储、网络应用等多种功能。随着科技的发展,数字机顶盒的设计方案也在不断进步和优化。本文将介绍数字机顶盒设计的几种实现方案。

关键字: 数字机顶盒 Android Linux

21ic 近日获悉,原小米 9 号创始员工李明在社交媒体平台公布了旗下首款产品乐天派桌面机器人,为全球首款 Android 桌面机器人,面向极客和发烧友的 AI + 机器人。据悉,李明两个月前宣布创业并进军 AI 领域,...

关键字: 小米 Android 桌面机器人 AI

计算机模拟(简称sim)是利用计算机进行模拟的方法。利用计算机软件开发出的模拟器,可以进行故障树分析、测试VLSI逻辑设计等复杂的模拟任务。

关键字: 模拟器 CPU模拟器 仿真器

尽管安装增长放缓,全球游戏 App 获客花费仍高达 267 亿美元 经济低迷导致 2023 游戏 App 营销优先考虑收入指标,用户增长次之 北京2023年3月9日 /美通社/ -- 今天,全球营销衡量与体验管理平台...

关键字: APPS iOS Android BSP
关闭
关闭