android 模擬器創建的sdcard 沒有mount

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 /

其實這個方法我也沒試過,大家可以試試

以上的做法如有不正確的地方請不吝指出

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章