Android emulator SDCard is removed for some reason

允我心安 提交于 2020-01-04 02:15:09

问题


I've created in the AVD a 3.2 (With Google APIs) device. However, I lately can't seem to be able to use the SDCard, when using:

Environment.getExternalStorageState();

I receive "removed".

How can I remount / unremove the SDCard? (I've tried creating new devices, and restarting the device many times).

I'm working on Windows 7 with Eclipse 2010, if it matters.

Thanks, Gal


回答1:


use this code

Intent i = new Intent(android.provider.Settings.ACTION_MEMORY_CARD_SETTINGS);
startActivity(i);

and then mount sdcard from menu...




回答2:


I was running into this with.... The problem was fixed when I went into AVD / Android Virtual Device Manager and changed the SD card settings for the device. I used the "create new image" button which I suppose creates a new file where the SD card contents are saved.



来源:https://stackoverflow.com/questions/9316535/android-emulator-sdcard-is-removed-for-some-reason

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