Android 开发时遇到的两个模拟器问题
开发环境: windows 2008 R2 x64, JDK 7u10, ADTv21.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 Studio 3.0出现 aapt2错误
- android emulator( android模拟器)
- android studio 编译的时候出现的错误和解决方法
- android之layout_toLeftOf和layout_toRightOf出现的错误
- Unity Android打包apk安装错误INSTALL_FAILED_CONFLICTING_PROVI
- linux下部署android模拟器
- Android纠正Activity横竖屏切换的生命周期的错误
- android studio模拟器本地安装目录
- .NET 开源了,Visual Studio 开始支持 Android 和 iOS 程序编写并