Android学习问题

配置安卓模拟器后启动遇到了几个问题:

1、配置完成后,每次启动都报错,报错为emulator-arm已停止工作,主要原因是要使用计算机自带的GPU,增加选项,这里有一个坑要注意,这个选项在ADV默认的配置窗口中是看不到的,原因是窗口太小。。将窗口尺寸调整下即可出现该选项,在我使用的ADT版本中,该选项的名称为:Use Host GPU勾上即可。

2、在配置完以上选项后,报错窗口不会出现了,然而启动模拟器后一直处于黑屏状态,后来看到报错信息为:

FB::flushWindowSurfaceColorBuffer: window handle 0x4 not found
FB: closeColorBuffer cb handle 0x3 not found

在多方搜索后找到了这篇帖子:

http://blog.csdn.net/cleverlzc/article/details/39156179

帖子中提及很重要的一点:

Try this with 'Use Host GPU' turned off in the emulator settings. I had the same error and that fixed it. –   Egg Jul 31 at 18:40
 
why does that cause a problem? –   789  Aug 1 at 15:32
 
I have no idea, haha –   Egg  Aug 1 at 17:13
 
but is still works pretty slow... even though i installed intel haxam –   789  Aug 2 at 18:07



Here's the deal. Host GPU is only supported for AVD devices that are using API 15 or later. You also have to have Android SDK Tools 17 or later installed. Also Host GPU is experimental. All of this is in the emulation documentation: http://developer.android.com/tools/devices/emulator.html

Also your machine has to support OpenGL (most do) and you will get better results if your machine has a separate GPU even though it will work with integrated graphic chipsets as well.

If you cannot take advantage of Host GPU then use the Snapshot option instead to gain some performance boost. This will take a snapshot of the ram on the initial start of the emulated device and then reuse it on initial boot start ups of the device. (Snapshot and Host GPU are actually mutually exclusive even though the ADV allows you to check both.)

大概意思是 API Level需要使用15或者更靠后的版本,创建ADV时修改下即可


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值