我刚刚开始想一个应用程序的想法,我必须自动化一些我的电脑通过我的手机做的事情。我之前已经下载了sdk,但是我不能让它让我定义一个用户设备。我认为这是旧安装的软件开发工具包的错误,所以我删除了所有的东西,包括.android文件夹,并重新安装了它,但没有用。我的自定义设备仍然没有出现在列表中。
当我尝试添加自定义设备定义时,我完成了所有步骤,设备显示在设备定义选项卡下,它是用XML编写的(格式不佳)到<username>/.android/devices.xml,但当我尝试创建新的AVD时,它没有显示在设备列表中,当我重新启动时,该设备也从设备定义列表中消失了。
我正在使用Windows8专业版x64和Eclipse Juno,SDK Manager21.0.1(这是在2012年12月22日凌晨2点左右下载的)。我在Eclipse中仅有的插件是Subversive、ADT和Eclipse Marketplace。
下面是<username>/.android/devices.xml的内容
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<d:devices xmlns:d="http://schemas.android.com/sdk/devices/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<d:device>
<d:name>Droid DNA</d:name>
<d:manufacturer>User</d:manufacturer>
<d:meta/>
<d:hardware>
<d:screen>
<d:screen-size>large</d:screen-size>
<d:diagonal-length>5.00</d:diagonal-length>
<d:pixel-density>xxhdpi</d:pixel-density>
<d:screen-ratio>long</d:screen-ratio>
<d:dimensions>
<d:x-dimension>1080</d:x-dimension>
<d:y-dimension>1920</d:y-dimension>
</d:dimensions>
<d:xdpi>440.58</d:xdpi>
<d:ydpi>440.58</d:ydpi>
<d:touch>
<d:multitouch>jazz-hands</d:multitouch>
<d:mechanism>finger</d:mechanism>
<d:screen-type>capacitive</d:screen-type>
</d:touch>
</d:screen>
<d:networking>
NFC
Wifi
Bluetooth</d:networking>
<d:sensors>
ProximitySensor
Gyroscope
LightSensor
Barometer
Compass
Accelerometer
GPS</d:sensors>
<d:mic>true</d:mic>
<d:camera>
<d:location>front</d:location>
<d:autofocus>true</d:autofocus>
<d:flash>true</d:flash>
</d:camera>
<d:camera>
<d:location>back</d:location>
<d:autofocus>true</d:autofocus>
<d:flash>true</d:flash>
</d:camera>
<d:keyboard>nokeys</d:keyboard>
<d:nav>nonav</d:nav>
<d:ram unit="GiB">2</d:ram>
<d:buttons>hard</d:buttons>
<d:internal-storage unit="GiB">
4</d:internal-storage>
<d:removable-storage unit="TiB"/>
<d:cpu>Generic CPU</d:cpu>
<d:gpu>Generic GPU</d:gpu>
<d:abi>
armeabi
mips
armeabi-v7a
x86</d:abi>
<d:dock/>
<d:power-type>battery</d:power-type>
</d:hardware>
<d:software>
<d:api-level>-</d:api-level>
<d:live-wallpaper-support>true</d:live-wallpaper-support>
<d:bluetooth-profiles/>
<d:gl-version>2.0</d:gl-version>
<d:gl-extensions/>
<d:status-bar>false</d:status-bar>
</d:software>
<d:state default="true" name="Portrait">
<d:description>The device in portrait orientation</d:description>
<d:screen-orientation>port</d:screen-orientation>
<d:keyboard-state>keyssoft</d:keyboard-state>
<d:nav-state>navhidden</d:nav-state>
</d:state>
<d:state name="Landscape">
<d:description>The device in landscape orientation</d:description>
<d:screen-orientation>land</d:screen-orientation>
<d:keyboard-state>keyssoft</d:keyboard-state>
<d:nav-state>navhidden</d:nav-state>
</d:state>
</d:device>
</d:devices>请帮帮我,我在谷歌搜索这个问题时发现了一个解决方案,AVD会写成',‘而不是’‘。来指定小数位,但这更多的是一个区域设置问题,尽管我检查了我的系统无论如何都不会这样做。
发布于 2013-01-15 14:36:20
我们也会遇到这个问题。我认为这可能是这个版本中的一个bug。
发布于 2013-03-06 21:10:21
实际上,这听起来像是不止一个人遇到过一些问题。在Android SDK Tools 21.1之前(实际上我认为在RC2中也解决了这个问题),在解析xxhdpi设备定义和AVD设备列表时存在一个问题。如果您尝试将Android SDK工具更新到版本21.1,我相信您的问题将会得到解决。
https://stackoverflow.com/questions/14004621
复制相似问题