简体   繁体   中英

I can't see “sdcard” folder in Android emulator

I have worked with the Android emulator and the SD Card without problem, but, I think that anything has happened with the last updates of Android, because, before, I could see the "sdcard" folder in "file explorer", but right now, I can't see "sdcard" folder in "file explorer" and I can't save any file, with the same application and configuration.

In my Android Manifest

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

My AVD has the next configuration:

AVD配置

And this is what I see on my "File Explorer". There is no any "sdcard" folder.

文件管理器

If I lunch the avd using the command line tools with the command:

emulator -avd em22 -sdcard C:\route-to-sdcard-image\sdcard.img

I can see in LogCat window next sequence of entries:

11-09 03:41:26.723: D/MediaScannerService(230): done scanning volume internal

11-09 03:41:26.743: D/MediaScannerService(230): start scanning volume external
11-09 03:41:26.833: V/MediaProvider(230): /mnt/sdcard volume ID: 167983881
11-09 03:41:27.523: I/Launcher.Model(154): not binding apps: no Launcher activity
11-09 03:41:27.833: D/dalvikvm(154): GC_EXPLICIT freed 4865 objects / 268728 bytes in 298ms
11-09 03:41:31.143: D/dalvikvm(154): GC_EXPLICIT freed 11622 objects / 580656 bytes in 226ms
11-09 03:41:31.253: V/MediaProvider(230): Attached volume: external
11-09 03:41:31.444: V/MediaScanner(230): pruneDeadThumbnailFiles... android.database.sqlite.SQLiteCursor@44ebd0b8
11-09 03:41:31.453: V/MediaScanner(230): /pruneDeadThumbnailFiles... android.database.sqlite.SQLiteCursor@44ebd0b8
11-09 03:41:31.497: D/MediaScanner(230):  prescan time: 155ms
11-09 03:41:31.497: D/MediaScanner(230):     scan time: 4ms
11-09 03:41:31.523: D/MediaScanner(230): postscan time: 67ms
11-09 03:41:31.523: D/MediaScanner(230):    total time: 226ms
11-09 03:41:31.553: D/MediaScannerService(230): done scanning volume external

However, in my File Explorer I can't yet to see the "sdcard" folder. And if I try to write in the SD Card I get the next error:

11-09 03:43:32.613: E/Functions(303): writeFile: java.io.FileNotFoundException: /mnt/sdcard/DCIM/BasketMonitor/2012-11-09-03:43:32-hola- (No such file or directory)

And If I try to push any file to the SD Card, I get the next error:

[2012-11-09 04:52:31 - ddms] transfer error: Read-only file system
[2012-11-09 04:52:31] Failed to push selection: Read-only file system

I don't understand anything!

see this /mnt/sdcard and you will find sdcard folder.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM