Xamarin.Android - Permission denied emulator cannot be started

对着背影说爱祢 提交于 2020-01-24 21:14:27

问题


I am very new to Xamarin.Android. When I run a project in Visual Studio 2015 it produces this error:

1>qemu-system-i386.exe: -drive if=none,index=0,id=system,file=C:\PROGRA~2\Android\ANDROI~1/system-images\android-19\default\x86/system.img: could not open disk image C:\PROGRA~2\Android\ANDROI~1/system-images\android-19\default\x86/system.img: Could not open 'C:\PROGRA~2\Android\ANDROI~1/system-images\android-19\default\x86/system.img': Permission denied 1>Emulator AVD_for_Nexus_S cannot be started.

I thought it was HAXM, but that is installed. I feel it's something simple, but can't seem to find it.

Any ideas on how to fix?


回答1:


Just grant full access permission to appropriate system.img file for all (or required only) users.




回答2:


Run Visual Studio as Administrator. In fact, I'd update your Visual Studio shortcut to always run Visual Studio as Administrator because this isn't the only case where you need Admin rights.

  1. Right click on the shortcut and go to properties.
  2. Click Advanced.
  3. Click Run as administrator.
  4. Click OK and OK.



回答3:


For not obvious reasons the Android emulator requests write-permissions to the system images. The emulator can't get these permissions without administrator rights because the image-files are located under C:\Program Files.

Move the SDK folder to a location where everyone has full access to (you can change the path Xamarin used in the options-dialog).



来源:https://stackoverflow.com/questions/39704098/xamarin-android-permission-denied-emulator-cannot-be-started

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