展会信息港展会大全

Android 开发时遇到的两个模拟器问题
来源:互联网   发布日期:2016-01-14 15:01:54   浏览:1677次  

导读:开发环境: windows 2008 R2 x64, JDK 7u10, ADT v21.0.1-543035一.启动 Nexus 7 模拟器失败模拟器启动出现如下错误:Starting...

开发环境: windows 2008 R2 x64, JDK 7u10, ADT v21.0.1-543035

一.启动 Nexus 7 模拟器失败

模拟器启动出现如下错误:

Starting emulator for AVD 'nexus7'

Failed to allocate memory: 8

This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.

网络搜索解决:

来源:http://code.google.com/p/android/issues/detail?id=36080

方法:用命令行启动,指定内存为 512M,默认1024M有问题

c:\xxx>emulator -avd nexus7 -memory 512

二.GUI 响应非常慢

模拟器启动出现如下错误:

Starting emulator for AVD 'nexus7'

emulator: ERROR: Could not load OpenGLES emulation library: Could not load DLL!

emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.

界面操作,响应很慢

网络搜索解决:

来源:http://stackoverflow.com/questions/11674306/eclipse-android-emulator-wont-launch

原因是未指定类库地址相关环境变量

方法:添加变量定义:LD_LIBRARY_PATH=/home/xxxx/devel/android-sdk-linux/tools/lib

为此,新建一个批处理来启动模拟器 em.bat,存放在sdk的tools目录下,如下:

setlocal

set LD_LIBRARY_PATH=K:\android\ide\adt-bundle-windows-x86_64\sdk\tools\lib

emulator.exe -avd nexus7 -memory 512 -gpu on

开发中,先用命令行启动模拟器,再在运行调试时,选择当前运行的AVD即可.

赞助本站

人工智能实验室

相关热词: android开发 教程

相关内容
AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港