2012-10-26 59 views
8

在模擬器上,我從Google下載了一張圖片。我可以在模擬器上找到圖像,但我不知道圖像的文件位置是什麼。要調試我的應用程序,我需要知道該圖像在哪裏。我怎樣才能獲得圖像的完整路徑?Android模擬器圖像存儲在哪裏?

+0

請記住,您下載SDK後必須爲每個API級別創建AVD http://developer.android.com/tools/devices/managing-avds.html –

回答

1

在這裏,這似乎爲我工作:

String path = Environment.getExternalStorageDirectory().getPath(); 
String myJpgPath = path + "/Download/dog-best-friend-1.jpg"; 
24

AVD documentation

默認情況下,Android的工具創建內部~/.android/avd/的AVD目錄(在Linux/Mac上),C:\Documents and Settings\<user>\.android\在Windows XP和C:\Users\<user>\.android\在Windows 7和Vista。

+0

我找不到圖像,我正在嘗試這個: 位圖bmp = BitmapFactory.decodeFile(「/ mnt/dog-best-friend-1.jpg」); –

2

如果你的圖像存儲在你的模擬器,那麼你可以找到像使用文件瀏覽

首次啓動模擬器則:

打開你的文件瀏覽器,並轉到mnt/sdcard/Download,你會發現你的形象這裏如果它的下載。

打開文件探索在Eclipse:window/show view/other/File Explore

0

系統圖像在 [{android_version_home_dir}/SDK /系統圖像下載/ {機器人版本數} /system.img>]

和AVD在C被創建:\用戶\ .android \ AVD \(窗口)或〜/ .android/AVD /(LINUX/MAC)

相關問題