如何为 Android 模拟器创建 SD 卡映像文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10754195/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to create an SD Card image file for the Android emulator?
提问by user1413437
I need to create an SD Card image file for an Android emulator that I am running. Given that I am a beginner at Android development, a complete step-by-step tutorial would be awesome.
我需要为我正在运行的 Android 模拟器创建一个 SD 卡映像文件。鉴于我是 Android 开发的初学者,一个完整的分步教程会很棒。
回答by Yury
There is a command line program for doing that called mksdcard: https://developer.android.com/studio/command-line/mksdcard.html
有一个名为 mksdcard 的命令行程序:https: //developer.android.com/studio/command-line/mksdcard.html
回答by Samir Mangroliya
There are already SD Card image files for use with the emulator installed.
已经有用于安装模拟器的 SD 卡映像文件。
If you create an AVD then choose a file path for the SD Card
如果您创建一个 AVD,则为 SD 卡选择一个文件路径
on My Machine the file path is:
在我的机器上,文件路径是:
C:\Users\Samir\.android\avd\Android2.2.avd\sdcard
Then, click 'Ok' and save the changes, then this will emulate an SD Card when you run the use the AVD in the Emulator
然后,单击“确定”并保存更改,当您在模拟器中运行使用 AVD 时,这将模拟 SD 卡
回答by CommonsWare
Can someone please tell me how to do that.
有人可以告诉我如何做到这一点。
In the AVD Manager, when you create an AVD, fill in a positive integer in the "SD Card" field. This is the size of your SD card in MB.
在 AVD 管理器中,创建 AVD 时,在“SD 卡”字段中填写一个正整数。这是您的 SD 卡的大小(以 MB 为单位)。
回答by Adeel Pervaiz
When you create a virtual device there is an Option for SD Card : You can select a file where you want ur SD card, or you can also give size for SD card, so that it will create and SD card image for you on the default android emulator location.
创建虚拟设备时,有一个 SD 卡选项:您可以选择您想要 SD 卡的文件,或者您也可以指定 SD 卡的大小,以便它默认为您创建 SD 卡映像安卓模拟器位置。
回答by ZarkDev
You can Google search before and find this: http://www.androiddevelopment.org/2008/11/11/how-to-create-and-use-the-sd-card-with-the-android-emulator/
你可以谷歌搜索之前找到这个:http: //www.androiddevelopment.org/2008/11/11/how-to-create-and-use-the-sd-card-with-the-android-emulator/