问题
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