Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Establishing an emulator

From: Android 4.1 SDK Jelly Bean New Features

Video: Establishing an emulator

There are two ways to test your application during development. You can check it in the actual device by connecting a USB cable between your device and the computer, or you can use a software emulator. While an emulator is no real substitute for an actual device, it's definitely very useful for baseline development. In this video, I'll show you how to set up an Android emulator for Jelly Bean. Although I'm on the Mac here, the process is identical on the PC. The first thing you have to know is that in Android-speak, an emulator is known as the Android Virtual Device, or AVD.

Establishing an emulator

There are two ways to test your application during development. You can check it in the actual device by connecting a USB cable between your device and the computer, or you can use a software emulator. While an emulator is no real substitute for an actual device, it's definitely very useful for baseline development. In this video, I'll show you how to set up an Android emulator for Jelly Bean. Although I'm on the Mac here, the process is identical on the PC. The first thing you have to know is that in Android-speak, an emulator is known as the Android Virtual Device, or AVD.

So, to start the process, I have my Android SDK Manager, which we installed in the previous movie, opened and up and running. I'm going to go to the Menu, choose Tools > Manage AVDs. The Android Virtual Device Manager dialog box will open. You can see that there are no AVDs or emulators listed here. In the real world development situation, you'd be creating many different emulators, targeting different OS versions and different screen resolutions as well.

We're going to set up a very basic one to get you started. The initial step is to click New. In the Create New Android Virtual Device dialog box, first enter the name of your emulator. We'll call this one Jelly_Bean. Notice that I'm using an underscore here. Now, let's set the Target from the list of available options. We're going to choose Android 4.1.2, which is the latest version of Jelly Bean. You'll notice the API Level is number 16.

Google has this distinct numbering system that it applies to all of its operating system versions. The next option is CPU/ABI. CPU is familiar to most, whether you're a TRON fan or not, as an abbreviation for Central Processing Unit. But what about ABI? ABI is short for Application Binary Interface. This can vary by device. But the most common in Android is ARM, processor manufacturer like Intel. And if I open up the CPU/ABI list, you'll see ARM listed there as well as the Intel Atom.

Let's choose ARM. Now, we're going to enter in the memory size for the SD card next. My Galaxy Nexus has about 16 gigs of memory. But let's say I want to target a wider range of devices. So, I'll enter in 10240 or 10 gigs. The next option is very important if you use the emulator a lot because it will save you a ton of time. Android emulators can create snapshots of where you are in the device, like if you're in a particular app, and it can automatically save and load the snapshot whenever you start the emulator.

For all that to work, you have to choose the Snapshot: Enabled checkbox. Now, we're ready to set the resolution of your emulator, which is found under the Skin category. As you can see, there are a bunch of preset options as well as the ability to enter custom values. We're going to go with the Default option for this basic emulator. Now, under Hardware here, you'll see a number of properties and values and you can also add the new ones in, including any of these from the list that you see here.

So, if you need to test specific features, this is where you would add in those properties. I'm going to just leave the default values here, and we're finally ready to create our new emulator. So I'll click Create AVD. Once that process is completed, and I'll warn you, it can take a bit of time, we'll see a new listing in the manage AVDs dialog box. And there is our result, our Jelly_Bean AVD has been created. I'll click OK. You can see the listing there up top in the AVD Manager dialog box.

If need be, you can select it and edit to make any changes. But let's go ahead and fire this puppy up. So with that selected, I'll click Start. This will bring up the Launch Options dialog box. The first option, Scale display to real size, allows you to change the size of the emulator according to your screen. In my situation, leaving this option unselected works out fine. The Wipe user data option that you see here really only comes into play after you've been testing for a good while.

Since we're just starting, we can leave that deselected. Now, of the next two options, I'm going to deselect Launch from snapshot for this time, because we don't have a snapshot first, but I definitely want to have Save to snapshot selected. Let's click Launch. Once we're there, I'm going to quit the emulator so I can demonstrate how useful the Snapshot function is. So I'll just go up and click Close. And then, close the Starting Android Emulator dialog box.

Now, let's start it again. And you'll see just how quickly the emulator will start up. I have Jelly_Bean selected, I click Start. This time, I'm actually going to choose Launch from snapshot as one of the launch options. Click Launch. Good job!

Show transcript

This video is part of

Image for Android 4.1 SDK Jelly Bean New Features
Android 4.1 SDK Jelly Bean New Features

26 video lessons · 5543 viewers

Joseph Lowery
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Android 4.1 SDK Jelly Bean New Features.

Return to your organization's learning portal to continue training, or close this page.


OK

Course retiring soon

Android 4.1 SDK Jelly Bean New Features will be retired from the lynda.com library on October 15, 2014. Training videos will no longer be available, but the course will still appear in your course history and certificates of completion.


Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.