2012-12-22 44 views
1

我刚刚开始了一个应用程序创意,我不得不通过手机自动执行一些我的计算机所做的事情。我从之前下载过sdk,但是我无法让它定义一个用户设备。我认为这是一个与旧的SDK安装的错误,所以我删除了包括.android文件夹在内的所有文件,并重新安装了一次,但无济于事。我的自定义设备仍然没有显示在列表中。用户定义的设备不会显示在设备定义列表上

当我尝试添加自定义设备定义时,我会经历所有步骤,设备显示在设备定义选项卡下,它以XML格式写入(格式错误)为<username>/.android/devices.xml,但它不显示当我尝试创建一个新的AVD并且当我重新启动时,设备列表也从设备定义列表中消失。

我正在使用Windows 8 Pro x64和Eclipse Juno SDK Manager 21.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会写“”而不是解决方案“”来指定小数位数,但这更像是一个语言环境问题,尽管我检查了我的数据并没有这样做。

回答

0

我们也遇到了这个问题。 经过多次实验,我们发现通过将xxhdpi替换为xhdpi可以正确显示它。 我认为这可能是这个版本中的一个错误。

0

其实,这听起来像是一个问题,不止一个人遇到了一些问题。在Android SDK Tools 21.1之前(实际上我认为这也是在RC2中解决的),解析xxhdpi设备定义和AVD设备列表时出现问题。如果您尝试将Android SDK工具更新至版本21.1,我相信您的问题将得到解决。

相关问题