如何在Android模拟器安装SD卡(1.6)模拟器、如何在、Android、SD

2023-09-06 03:31:21 作者:那一年的蜕变

我想在Android模拟器(1.6)安装SD卡。我使用的Eclipse 3.4.0

I want to install SD card on android emulator(1.6). I am using Eclipse 3.4.0

我发现了一个命令来安装SD卡:

I found one command to install SD card:

mksdcard

但是,在执行它,我没有得到??

But where to execute it I am not getting??

我试图开发工具 - >终端仿真器

I tried in Dev tools-> Terminal Emulator

但它给错误:权限被拒绝

But it is giving error : permission denied

感谢你..

推荐答案

,以确保你的SD卡是否正确关联到你的模拟器实例这种最简单的方法是创建一个AVD使用SD卡。做到这一点,如下所示: 在Eclipse: 窗口=> Android SDK和AVD经理=>新:

this easiest way to make sure your sd card is properly associated to your emulator instance is to create an AVD with an SD card. Do it as follows : in Eclipse: Window=> android SDK and AVD manager=>New :

-give一个名称,你的AVD(不允许空格) -give一个SDK目标 -give大小想要的SD卡 - 创建新的AVD

-give a name to your AVD (no space allowed) -give a SDK target -give size to the wanted SDcard -create the new AVD

或者,第二解决方案,您已经有了自己的AVD,你想一个SD卡添加到它: 打开命令提示符或终端(的Windows / Linux?) cd到你的SDK / tools目录 执行以下命令: mksdcard 256M NameOfYou​​rCard (你可以通过你想要的大小OFC)

Or, 2nd solution, you already have your own AVD and you want to add a SD card to it: open a command prompt or terminal (windows/ linux?) cd to your sdk/tools directory execute the following : mksdcard 256M NameOfYourCard (you can pass the size you want ofc)

然后,把下面的运行在启动额外的命令行字段配置:

and then, put the following in you run configuration in the "Launch Additional command line" field :

-sdcard fullPathToYourCard

-sdcard fullPathToYourCard

它应该工作。 如果还不清楚,看看在这里更多的相关详细过程

It should work. If it's not clear, have a look in here for more detailled procedure