当前位置:首页 > 工业控制 > 电子设计自动化
[导读]作者:岳峰,华清远见嵌入式学院讲师。 更新了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次

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

其他电脑(比如安卓手机/平板电脑)的屏幕坏了,你可能想在安排维修之前紧急访问一些东西。你可以使用android的USB OTG功能(是的,几乎每个android都支持这个功能,你可以将鼠标和键盘连接到它)。

关键字: USB 鼠标 Android 树莓派

Google 宣布与中国 AR 科技公司 XREAL 达成深度战略合作,联合推出全球首款专为 Android XR 平台打造的旗舰级 AR 眼镜 Project Aura。

关键字: Google XREAL Android XR眼镜 AR

继停止维护AOSP开源项目后,谷歌母公司Alphabet近日被曝在其安卓系统(Android)、Pixel手机以及Chrome浏览器等部门裁员数百人。这一举措引发了业界的广泛关注,也引发了对谷歌未来业务布局的诸多猜测。

关键字: 谷歌 AOSP Android 裁员

在本教程中,我们将使用Capacitor 6、Angular和TypeScript构建一个Android应用程序,该应用程序通过串行端口连接到BleuIO USB加密狗。该应用程序允许用户直接从Android设备发送和接...

关键字: Android USB 电容器 BLE设备

早前媒体报道谷歌将停止维护Android开源项目(AOSP),将Android开发全面转向内部闭源分支,目前这一消息已经得到谷歌官方确认。

关键字: 谷歌 Android 开源

本项目演示了如何通过OTG (on - go) USB在Android设备上使用BleuIO USB加密狗作为串行端口。使用电容器6和@adeunis/电容器-串行插件,我们建立串行连接,发送AT命令,并实时读取响应。该...

关键字: 电容器 Android 传感器 微控制器 嵌入式系统

罗德与施瓦茨(以下简称“R&S”)和全球领先的GNSS模块供应商u-blox合作,成功验证了u-blox最新的汽车GNSS模块。该验证基于R&S SMBV100B GNSS模拟器的自动化测试解决方案,符合最新发布的中国G...

关键字: 车载导航模块 模拟器

在Linux操作系统中,Android Debug Bridge(ADB)是一个功能强大的命令行工具,它允许开发者在计算机和Android设备之间建立通信,从而进行调试、管理、安装应用等操作。本文将详细介绍在Linux系...

关键字: Linux系统 Android Debug ADB

随着Android操作系统的进步,智能手机的使用日益增加。随后,有报道称,恶意个人和黑客利用 Android 提供的漏洞来访问用户珍视的数据。例如,此类威胁包括 2021 年针对 Android 设备发布的 Flubot...

关键字: Android 恶意软件
关闭