標籤:mount android sdcard
android 模擬器建立的sdcard 沒有mount
今天在練習的時候發現,sdcard雖然是存在了,但是沒有mount,所以也就沒有那些讀寫的許可權,也就是說sdcard沒有啟用,相當於使用不了sdcard。
網上找了會解決的辦法,現在來總結一下,只要有幾種方法。
1.在Eclipse中滑鼠移到項目上面,右鍵,run as ——>run configrations——>左邊點擊項目名,右邊點擊target,然後往下拉,找到Additional Emulator Command Line Options
然後把我們建立的sdcard所在路徑填上來(這個路徑一般是C:\Users\Administrator\.android\avd\4.2.2.avd\sdcard.img)
-sdcard C:\Users\Administrator\.android\avd\4.2.2.avd\sdcard.img ——>點擊ok
(紅色的avd是我所用的版本號碼,大家根據自己所用版本號碼所建立的avd對應找,如果這個路徑下沒有sdcard.img,說明你還沒有建立sdcard,更談不上使用sdcard了,建立的 方法我這裡就不多說了)
2.在Eclipse中 window——>preferences——>android——>Launch,在Default emulator options 右邊填上上面的路徑
-sdcard C:\Users\Administrator\.android\avd\4.2.2.avd\sdcard.img ——>點擊ok
3.在AVD模擬器裡,編輯SD Card的時候,有兩個選項,一個是Size,一個是 File,選擇File,然後選擇sdcard.img檔案,填上
C:\Users\Administrator\.android\avd\4.2.2.avd\sdcard.img
4.命令列中執行adb shell,mount -o remount rw /
其實這個方法我也沒試過,大家可以試試
以上的做法如有不正確的地方請不吝指出
android 模擬器建立的sdcard 沒有mount