开发者

Is there any possibilities to add some image, media or any file to emulator in Android? [duplicate]

This question already has answers here: Close开发者_如何学编程d 11 years ago.

Possible Duplicate:

How to Store files on Emulator?

I'm trying to add some files to emulator. Is it possible to do that.


You can use adb push as explained here:

adb push c:\somefile.txt /sdcard


why not for example

String path = Environment.getExternalStorageDirectory().getAbsolutePath();
File mfile = new File(path, "sample.txt");
mfile.mkdir();

this will create a "sample.txt" file on your sdcard


you can also push file from ddms select the device from the device window in the ddms and click on the File Explorer tab now select the sdcard.

Now on right side of File Explorer window two button are their which are enable to you for file import or export to the device to pc and vice versa

here is the image: File Explorer Screenshot

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜