I created a virtual device with an SD card (AVD Manager->Edit the device->Advanced Settings) but my app still shows it as not there:
//This prints: External: removed
Log.d(TAG, "External: " + Environment.getExternalStorageState() );
How do I get external storage to work?
I'm using:
Android Studio 0.8.14 Device: Nexus 5, 4.4 KitKat, CPU: x86
In addition to creating an image for the SD card in the AVD Manager, you also need to manully edit the config file (this is a bug).
Find the emulator's configuration in your home directory:
For example, on the Nexus 5 (created by Android Studio), it was:
Change the below setting to be: