error: 'SDL init failure, reason is: No available video device' when launching AVD

自古美人都是妖i 提交于 2019-12-21 02:22:06

问题


Hey guys, this is killing me. Every time I try to run my Android app in Eclipse, I'm getting the error:

[2011-05-24 23:11:04 - app] Android Launch!
[2011-05-24 23:11:04 - app] adb is running normally.
[2011-05-24 23:11:04 - app] Performing droid.blah.app activity launch
[2011-05-24 23:11:04 - app] Automatic Target Mode: launching new emulator with     compatible AVD 'default'
[2011-05-24 23:11:04 - app] Launching a new emulator with Virtual Device 'default'
[2011-05-24 23:11:04 - Emulator] SDL init failure, reason is: No available video device

I'm running Ubuntu 10.04 64-bit and the Android 2.3.3 SDK. I've googled EXHAUSTIVELY to try to find a solution, tried installing all the 32-bit libraries that were suggested here, but they're already installed.

I'm seriously considering just moving to the 32-bit version of Ubuntu, but it seems from what I've read that other people can get it working. JUST NOT ME! Does anyone have any advice? Thanks!


回答1:


You need more 32 bit libraries. ;)

On Ubuntu/Debian run:

sudo apt-get install ia32-libs



回答2:


I also got this same error when running automated builds on our Jenkins server. I think the problem is that the emulator needs to talk to an X display. If you are running this on your own machine, you can try setting the DISPLAY environment variable in the terminal before trying to launch the emulator. Something like:

export DISPLAY=:0.0

If you are running this on a headless Jenkins server, then you need to run an Xvnc session during the build to provide an X server for the emulator.




回答3:


I get the "SDL init failure" when running the "emulator" command with a user with not enough privileges. Ex. jenkins user gets the error, but not root.

Drop to the commandline and run the emulator command with same user that is running eclipse. Then switch to root and run emulator command again.

If it works with user root, consider installing and running eclipse as root
(not recommended, but I don't know the proper way to do it, this is just a workaround).



来源:https://stackoverflow.com/questions/6129091/error-sdl-init-failure-reason-is-no-available-video-device-when-launching-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!