Android Simulator using SD card

Source: Internet
Author: User

In the application development of Android often use the SD card related debugging, this article is about the use of SD card in the Android simulator

First, the preparatory work

Get ready for your Android app development environment before you introduce

L JDK 1.6+

L Android SDK 1.6 ( This version does not matter, back in the upgrade )

L Android SDK Setup

L Eclipse IDE for Java developers

For detailed configuration methods, please refer to:http://blog.sina.com.cn/s/blog_4de067e40100mnl7.html

Second, create an SD card image file

Once the application development environment is set up, create the SD card image file below.

Start -and-run->cmd enter the DOS interface and enter the following command:

mksdcard-l sdcard 512M f:/sdcard.img , as shown



At this point the sdcard.img image file is generated under the F -disk, as shown in


Third, associated SD card and simulator

There are two ways to do this, one is the command line, and the other is to use the Eclipse tool

Start by creating an emulator, and entering Android at the DOS command line will display a management window, as shown in

And then new one of the simulated exercises, such as

Name you can take any

Target Select your latest version of the Android SDK to

SD Card can select the image you just created

Note : For the image of SD card if you can set parameters such as Eclpse, you can not check now

L command line mode

In this way, the first thing to look at the specific simulator, under DOS input command

Android List AVD,

Then launch the emulator:emulator–avd vod-sdcard f:/sdcard.img where VOD is the emulator you create yourself, as shown in



L Eclipse Tools

In Eclipse, in run->run configurations ... (myeclipse is Open Run Dialog ... ) Inside the Target tab of the menu , enter the startup parameters, such as:

   

But I'm using a myeclipse that doesn't have the option above, so when you create the emulator you have selected the image, see the beginning of this section. And be sure to select the emulator with the SD card image When you start the application

Iv. importing files to the SD card

Start your application first (the app must be running on an emulator with an SD image). After the application starts

L command line mode import

ADB push Testjni.java Sdcard/test.java

description :Testjni.java is a file in my C packing directory, if you want to change a name, you can change the name after sdcard/.

With the adb shell command connected to Android, after entering the Mnt/sdcard file, you can see the Test.java file that you just uploaded , as shown in

L Eclipse Tools Import

With the simplest tool, after launching the application, cut the Eclipse view to Ddms, as shown in

The two icons in the middle are uploaded, downloaded



V. Use the files in the SD card in the simulator

After importing a file, if you want to access it in the emulator, you also need to scan the media file in Dev tools in the emulator , such as:





When the scan is complete, you can use it, such as playing music.


Android Simulator using SD card

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.