Android 模拟器未运行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11902685/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:08:09  来源:igfitidea点击:

Emulator not running

androidandroid-emulator

提问by Padma Kumar

My AVD Emulator is not running after I changed my Hardisk to other MotherBoard i5 3GHz processor without re-installing OS.

在我将硬盘更改为其他主板 i5 3GHz 处理器后,我的 AVD 模拟器无法运行,而无需重新安装操作系统。

OS: Ubuntu 10.10

操作系统: Ubuntu 10.10

my emulator is not running thru eclipse. when I click Run As.. Android application.

我的模拟器没有通过 Eclipse 运行。当我单击 Run As.. Android 应用程序时。

Then I try to run thru the command prompt then its showing some error as below.

然后我尝试通过命令提示符运行,然后显示一些错误,如下所示。

padmakumar@padmakumar-desktop:~$ emulator -avd JellyBelly
Failed to create Context 0x3005
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
Segmentation fault

how to resolve this error to run the emulator?

如何解决此错误以运行模拟器?

EDIT:using emulator -avd JellyBelly -verbose

编辑:使用模拟器 -avd JellyBelly -verbose

padmakumar@padmakumar-desktop:~$ emulator -avd JellyBelly -verbose
emulator: found SDK root at /home/padmakumar/android-sdk
emulator: Android virtual device file at: /home/padmakumar/.android/avd/JellyBelly.ini
emulator: virtual device content at /home/padmakumar/.android/avd/JellyBelly.avd
emulator: virtual device config file: /home/padmakumar/.android/avd/JellyBelly.avd/config.ini
emulator: using core hw config path: /home/padmakumar/.android/avd/JellyBelly.avd/hardware-qemu.ini
emulator: Found AVD target API level: 16
emulator: found skin 'WXGA800-7in' in directory: /home/padmakumar/android-sdk/platforms/android-16/skins
emulator: autoconfig: -skin WXGA800-7in
emulator: autoconfig: -skindir /home/padmakumar/android-sdk/platforms/android-16/skins
emulator: found skin-specific hardware.ini: /home/padmakumar/android-sdk/platforms/android-16/skins/WXGA800-7in/hardware.ini
emulator: keyset loaded from: /home/padmakumar/.android/default.keyset
emulator: trying to load skin file '/home/padmakumar/android-sdk/platforms/android-16/skins/WXGA800-7in/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//kernel-qemu
emulator: autoconfig: -ramdisk /home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//ramdisk.img
emulator: Using initial system image: /home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//system.img
emulator: autoconfig: -data /home/padmakumar/.android/avd/JellyBelly.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/padmakumar/.android/avd/JellyBelly.avd/userdata.img
emulator: autoconfig: -cache /home/padmakumar/.android/avd/JellyBelly.avd/cache.img
emulator: autoconfig: -sdcard /home/padmakumar/.android/avd/JellyBelly.avd/sdcard.img
emulator: Physical RAM size: 1024MB

Content of hardware configuration file:
  hw.cpu.arch = arm
  hw.cpu.model = cortex-a8
  hw.ramSize = 1024
  hw.screen = touch
  hw.mainKeys = no
  hw.trackBall = yes
  hw.keyboard = no
  hw.keyboard.lid = no
  hw.keyboard.charmap = qwerty2
  hw.dPad = yes
  hw.gsmModem = yes
  hw.gps = yes
  hw.battery = yes
  hw.accelerometer = yes
  hw.audioInput = yes
  hw.audioOutput = yes
  hw.sdCard = yes
  hw.sdCard.path = /home/padmakumar/.android/avd/JellyBelly.avd/sdcard.img
  disk.cachePartition = yes
  disk.cachePartition.path = /home/padmakumar/.android/avd/JellyBelly.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 800
  hw.lcd.height = 1280
  hw.lcd.depth = 16
  hw.lcd.density = 213
  hw.lcd.backlight = yes
  hw.gpu.enabled = no
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 48
  hw.sensors.proximity = yes
  hw.sensors.magnetic_field = yes
  hw.sensors.orientation = yes
  hw.sensors.temperature = yes
  kernel.path = /home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//kernel-qemu
  kernel.parameters =  android.checkjni=1
  disk.ramdisk.path = /home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//ramdisk.img
  disk.systemPartition.initPath = /home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//system.img
  disk.systemPartition.size = 200m
  disk.dataPartition.path = /home/padmakumar/.android/avd/JellyBelly.avd/userdata-qemu.img
  disk.dataPartition.size = 201m
  avd.name = JellyBelly
.
QEMU options list:
emulator: argv[00] = "/home/padmakumar/android-sdk/tools/emulator-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/home/padmakumar/.android/avd/JellyBelly.avd/hardware-qemu.ini"
Concatenated QEMU options:
 /home/padmakumar/android-sdk/tools/emulator-arm -android-hw /home/padmakumar/.android/avd/JellyBelly.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0xc800000,initfile=/home/padmakumar/android-sdk/system-images/android-16/armeabi-v7a//system.img
emulator: mapping 'system' NAND image to /tmp/android-padmakumar/emulator-IM8Usk
emulator: rounding devsize up to a full eraseunit, now c810000

emulator: nand_add_dev: userdata,size=0xc900000,file=/home/padmakumar/.android/avd/JellyBelly.avd/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now c918000

emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '213'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: nand_add_dev: cache,size=0x4200000,file=/home/padmakumar/.android/avd/JellyBelly.avd/cache.img
emulator: Initializing hardware OpenGLES emulation support
Failed to create Context 0x3005
emulator: Can't start OpenGLES renderer?
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=2
Segmentation fault

Edit:whatever emulator I am creating is not running.

编辑:我创建的任何模拟器都没有运行。

回答by Hardikgiri Goswami

It is actually happen when you upgrade your ADT and SDK to the 20th version... That occurs with many people but the solution is you have to start "emulator-arm" instead of "emulator"... so may be it works... and for more detail you can refer http://code.google.com/p/android/issues/detail?id=34233this link...

当您将 ADT 和 SDK 升级到第 20 个版本时,实际上会发生这种情况……很多人都会发生这种情况,但解决方案是您必须启动“emulator-arm”而不是“emulator”……所以它可能有效。 .. 有关更多详细信息,您可以参考http://code.google.com/p/android/issues/detail?id=34233此链接...

回答by Leo

I had the same problem

我有同样的问题

Edit your AVD GUI settings. Hardware Section, select New. Hit the "Property" Dropdown Select "GPU Emulation" then "OK" Change "Gpu Emulation" to "YES" with the dropdown in Hardware Section.

编辑您的 AVD GUI 设置。硬件部分,选择新建。点击“属性”下拉菜单 选择“GPU 仿真”然后“确定” 使用硬件部分的下拉菜单将“Gpu 仿真”更改为“是”。

Save and try again

保存并重试

回答by dharam

Failed to create Context 0x3005
emulator: Can't start OpenGLES renderer?

generally this thing happens when your emulator size is out range compare to your OS Support GL drives .

通常,当您的模拟器大小与您的 OS Support GL 驱动器相比超出范围时,就会发生这种情况。

try to scale your emulator according to your screen size and monitor dpi .

尝试根据您的屏幕尺寸和显示器 dpi 缩放您的模拟器。

Hope it will help .

希望它会有所帮助。

回答by user827992

You are probably missing the link with the GLES libraries for the emulator, make sure that in

您可能缺少与模拟器的 GLES 库的链接,请确保在

<Android SDK root>/tools/lib

you have this .so files

你有这个 .so 文件

libEGL_translator.so    
libGLES_CM_translator.so    
libGLES_V2_translator.so    
libOpenglRender.so

you have to add this files to the global set of libraries for your OS, you can add libraries from a specific path doing just the following:

您必须将此文件添加到操作系统的全局库集中,您可以从特定路径添加库,只需执行以下操作:

  • sudo gedit /etc/ld.so.conf.d/androidGL.conf
  • write only the path to libraries in this file, in your case <Android SDK root>/tools/lib, just a path, do not specify any library, all the libraries in that path will be automatically collected
  • save and close gedit
  • update the global set of libraries to add the new path with sudo ldconfig
  • sudo gedit /etc/ld.so.conf.d/androidGL.conf
  • 在这个文件中只写库的路径,在你的情况下<Android SDK root>/tools/lib,只是一个路径,不指定任何库,该路径中的所有库将被自动收集
  • 保存并关闭 gedit
  • 更新全局库集以添加新路径 sudo ldconfig

now re-try to run your avd.

现在重新尝试运行您的 avd。

回答by sarath

Change the resolution of your screen(increase).That did the trick for me

更改屏幕分辨率(增加)。这对我有用

回答by ukuser

I too was having this problem. My symptoms:

我也遇到了这个问题。我的症状:

  1. I could start Android sessions
  2. Eclipse then displayed the above error
  3. I use Windows Vista, Android SDK 20 and Eclipse 4.2.0
  1. 我可以开始 Android 会话
  2. Eclipse然后显示上面的错误
  3. 我使用 Windows Vista、Android SDK 20 和 Eclipse 4.2.0

The actual issue was quite straight forward (noting I did have GPU emulator = yes). It turns out that Eclipse couldn't see the Android session!

实际问题非常简单(注意我确实有 GPU 模拟器 = 是)。原来Eclipse看不到Android会话!

http://www.linkedin.com/groups/Problem-in-executing-code-on-86481.S.138513463

http://www.linkedin.com/groups/Problem-in-executing-code-on-86481.S.138513463

As such I found

因此我发现

Android Emulator starts but Eclipse doesn't recognize it

Android 模拟器启动但 Eclipse 无法识别

Restarted ADB server and bobs your uncle (also restarting Eclipse) solution in hand!

重新启动了 ADB 服务器并在手上解决了你的叔叔(也重新启动了 Eclipse)解决方案!

I hope that helps someone else.

我希望能帮助别人。

回答by ?ukasz

If you use Windows 8 64 bit with intel processor and NVidia graphics card you should install Windows updates. Specifically : NViDIA driver update for GForce, and intel corporation driver update for HD Graphics.

如果您使用带有英特尔处理器和 NVidia 显卡的 Windows 8 64 位,您应该安装 Windows 更新。具体来说: GForce 的 NViDIA 驱动程序更新,以及 HD Graphics 的英特尔公司驱动程序更新。

回答by user1576593

There is nothing to be worried about this error you are not creating your Avd according to platform Just Make it Proper will showing you an example

没有什么可担心这个错误你没有根据平台创建你的 Avd Just Make it Proper 会向你展示一个例子

1 -Android 2.2 ,
2 -Api Level 8 , 3 -SDCard 1024

1 -Android 2.2 ,
2 -Api Level 8 , 3 -SDCard 1024

Will definitely work just make it according the Platform!

肯定会工作,只是根据平台制作!

回答by mr.low

I was having this issue with windows 8 x64. make sure u install the correct driver for your graphics card. The error went away after i installed the correct driver.

我在 Windows 8 x64 上遇到了这个问题。确保为您的显卡安装正确的驱动程序。安装正确的驱动程序后,错误消失了。

回答by Danial

All i did to fix this was :

我所做的就是解决这个问题:

  1. Removed Device from AVD manager
  2. Create Virtual Device again
  1. 从 AVD 管理器中删除设备
  2. 再次创建虚拟设备