问题
I have a simple Android app that pulls all music files on the phone and displays in a listView. The code works fine, but any time I change a song on the sdcard, either adding or deleting, the changes are not displayed. It looks as if the sdcard is cached or something. If I remount the sdcard, the changes are displayed. I can shut down the emulator and start it back up and still nothing changes until I remount. How can I get the emulator to read changes on the sdcard without having to remount every time there is a change? Am I missing a setting or something?
回答1:
If you add any media file to emulator you have to run Menu-->Dev Tools-->Media Scanner
to make it visible in gallery or any other application in emulator.
来源:https://stackoverflow.com/questions/9130328/android-emulator-sdcard-not-updating-properly