qq_15838819 2016-09-13 02:56 采纳率: 0%
浏览 2325
已结题

使用AVD直接运行代码报错

AVD本身的运行没有问题
报错如下

[2016-09-13 10:51:12 - TestApp] ------------------------------
[2016-09-13 10:51:12 - TestApp] Android Launch!
[2016-09-13 10:51:12 - TestApp] adb is running normally.
[2016-09-13 10:51:12 - TestApp] Performing com.cyber.testapp.StartActivity activity launch
[2016-09-13 10:51:12 - TestApp] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2016-09-13 10:51:16 - TestApp] Launching a new emulator with Virtual Device 'AVD_for_Nexus_7_2012_by_Google'
[2016-09-13 10:51:20 - Emulator] emulator: WARNING: VM heap size set below hardware specified minimum of 96MB
[2016-09-13 10:51:20 - Emulator] emulator: WARNING: Setting VM heap size to 256MB
[2016-09-13 10:51:20 - Emulator] Hax is enabled
[2016-09-13 10:51:20 - Emulator] Hax ram_size 0x40000000
[2016-09-13 10:51:20 - Emulator] HAX is not working and emulator runs in emulation mode.
[2016-09-13 10:51:20 - Emulator] The memory needed by this VM exceeds the driver limit.
[2016-09-13 10:51:20 - Emulator] qemu-system-x86_64.exe: -drive if=none,index=1,id=cache,file=C:\Users\LDY.android\avd\AVD_for_Nexus_7_2012_by_Google.avd/cache.img: could not open disk image C:\Users\LDY.android\avd\AVD_for_Nexus_7_2012_by_Google.avd/cache.img: Could not open 'C:\Users\LDY.android\avd\AVD_for_Nexus_7_2012_by_Google.avd/cache.img': Invalid argument

  • 写回答

2条回答

  • 寻水鱼 2016-09-13 05:41
    关注

    gradle里配置dexOptions{javaMaxHeapSize = "..."}比如2048MB
    而且你的AVD是_Nexus_7,安卓7.0了吧,你gradle里配置的sdk版本可能不匹配(这点仅是猜测)~祝解决问题

    评论

报告相同问题?

悬赏问题

  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝