We’ll look at: How to speed up the emulator. Solve the problem in which the Android SDK Manager could not find packages. Solve the Android SDK parse error problems. Solve the issue in which the emulator doesn’t execute your program. If you have any other problems leave a comment below and I’ll solve them.

If you like articles like this, it helps to tell Google + with a click here

Where is Eclipse Android SDK Manager Located

To locate the Android SDK Manager just open it inside of Eclipse. Click Window – Android SDK Manager. The location on your system is at the top of the screen where it says SDK Path, as you can see here.

If you couldn’t find it there, then do the following depending on your OS.

For Windows search for android-sdks. That is the folders name

For Macs search for adt-bundle-mac. That folder contains the SDK

Android SDK Manager could not find Packages

This will solve both this problem and the Android SDK Manager Peer Not Authenticated error you are getting. If when you open the Android SDK Manager you see this.

1. Open the Android SDK Manager in Eclipse

2. Click on Android SDK Manager in the top tool bar

3. Click Preferences and then put a check in the box that says “Force https://… sources to be fetched using http:// like you see here

4. You may have to do this and then click Clear Cache if the problem continues

Android Won’t Execute Program in Emulator

If when you execute your program, if the Android emulator opens, but your app doesn’t execute, execute your program instead by clicking Run Configuration like you see here. Put a tick in the radio button labeled Launch: and then select your program in the drop down. Then click Run.

That should solve that problem.

How to Set Up Android Emulator

Click the Android Virtual Device Manager Icon. It looks like the Android robot in a smart phone. This setup works very quickly for me. My emulator loads in about 30 seconds. You’ll need to properly setup Virtual Machine Acceleration though like I describe next.

How to Speed up the Android Emulator

If you are NOT running a virtual machine, you can dramatically improve the performance of your Android emulator. Here is how depending on the OS you are using.

Configuring VM Acceleration on Windows

Intel states that this works with the following versions of Windows: Windows 7 (32/64-bit), Windows Vista (32/64-bit), Windows XP (32-bit only)

Configuring VM Acceleration on Macs

2. Select the package on the left side of the screen and click the radio button labeled Accept License and then Install.

3. Shutdown Eclipse and then get and execute the Intel Hardware Accelerated Execution Manager (HAXM) release_1.0.4-hotfix found on this page at Intel

4. You can then confirm that it is operating correctly by opening a terminal window and running the following command kextstat | grep intel (You should get a returned message that looks like this : com.intel.kext.intelhaxm

5. Now to use it, execute your program using Run > Run Configuration like I showed above

6. Click the Target tab.

7. Select the x86-based AVD you created previously

How to Execute Android Apps on your Android Phone Tablet

1. Enable USB debugging on your device

a. On devices running Android 3.2 or older, you can find the option under Settings > Applications > Development

b. On Android 4.0 and newer, it’s in Settings > Developer options

c. On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options

2. If you’re developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.

3. If your on a Mac you don’t need drivers.

4. Now that the device is set up for development, on your Android device click Settings – Developer Options – Put a check in the box marked USB Debugging.

5. Click to allow the computer to access and ok for everything else that pops up

6. To execute on your device click Run > Run Configuration like I showed above

7. Click the Target tab

8. Put a tick in the radio button marked Launch on all compatible devices / AVD’s and hit Run

It works INSTANTLY! That is why it is better to develop on an actual device over using an emulator

That’s All Folks

If I missed anything, or I didn’t cover your specific problem leave a comment below and I’ll do my best to help.

i did it and got: HAM can be installed but will not work until VT-x is enable
sol:
1.download and run secureable. if hardare virtualization =yes
go to your bios and enable vt-x
2. else go to yourPCtechnicalsuport.com ask for a bios that support virtualization
3. if everything fails use oracleVM

I might be wrong, but checking this video, at 05:15 you say to get intel x86 Emulator Accelerator in order to download VM files.
I believe that this only applies if you have INTEL based processor, please correct me if I’m wrong (I’m trying to be helpful, not to correct you.)

P.S. Thank you so much for what you bring to internet, all your website as well as your videos are in the level of a college course.

Thank you for your tutorial!!
When I create an AVD, it doesn’t allow me to select a CPU, the combo box is disabled, and “ARM(armeabi -v7a)” is selected by default. I have installed intel accelerator as described.
My CPU is intel, 1.6Ghz dual core.

Thought I’d drop these solutions to other problems I’ve run into. Anyone new to android, I suggest copy-pasting this comment to a note somewhere just in case, and definitely bookmark Derek’s page!

Keep in mind, new android developers, that you probably don’t really need to do anything I’ve listed here until you run into issues down the road, unless Derek already listed it somewhere.

I might come back with more – so far with Android I’m fairly cursed =P

(Derek, if this is too big a comment, or something, feel free to move the info somewhere more relevant or put up the info however you want, I’m not here for points.)

=================================================================

IF: Your Logcat doesn’t work AND/OR you are an ATI video card user on Windows:

Set env variables – Test these by building an android project from the command line (Easy to google):

The defaults are something like this, but YOUR PATH MAY BE DIFFERENT THAN MINE

// add a variable: Technically, there are other ways to do this, but whatever..
ANDROID_HOME = C:\Program Files (x86)\android\android-sdk\tools
// add this to path so that you can simply change the variable if you need to move/reinstall the SDK:
// ensure that each part of your path is separated by a semi-colon, and that there are no spaces
%ANDROID_HOME%

// Likewise for ADB: Look for it in PLATFORM-TOOLS (Google will lie, it used to be in /tools)

ADB_HOME = C:\Program Files (x86)\Android\android-sdk\platform-tools

NOTE:

IF YOU ARE RUNNING ANT, AND HAVE AN ATI VIDEO CARD:

Each time you update your video card drivers, you should check your PATH. When calling Android commands from Ant (And you will), Xcopy is called x10.. This is bad. Your project is being ruined, even though all tasks seem to run correctly. (There is also another reason Xcopy can be called recursively, but I solved that issue without knowing what it was, sorry. I *Think* it was due to Juno leftovers..) This happens because Ant is old, but it’s still awesome and not a tool worth ignoring.

To prevent this from happening, simply ensure that all of the locations defined in your path are not duplicates, and (For performance reasons) that the locations they point to really exist. For an example, my complete path for my development environment contains each of the following. It is possible that some ATI card users will have more than 2 elements for AMD/ATI, but they all have to point to something real!

The first three will be on all Windows systems, four and five will be -similar- for all ATI card users, and the rest point to variables you should already know about. I’m actually glad I forgot to check path on latest driver update, so I could add that here..

====================================

Eclipse auto-completed a method for you, then said it doesn’t exist….?

Install the latest/relevant support library..

There’s about 20 ways to fix this, most are listed at StackOverflow here, though Derek might know the ‘best’ way, when the SDK manager can’t handle it.

====================================

You haven’t added the source code yet, and want to read it from inside eclipse? Seriously, don’t google this problem.. evidently the source code wasn’t available through the SDK manager in the past, and people went to great lengths to get it. Nowadays it’s simple:

Note, it’s not a good idea to use a different version than the lib you’ve already attached (e.g. 4.2.x = 17)

btw, grepcode.com has a decent interface for searching the android code, but goes down sometimes. Don’t rely on it being there, but if you’re away from your developer console and get curious, it’s good to know about.
====================================
Hope anyone with one of these problems finds this!

No problem at all. Sorry about the bad closing tag, I was copy-pasting snippets from my notes there, and it was late. =P

By any chance do you know more about how elements in a path can interfere like I described? For an example, with Ant, if I make two references in my Path to C:\WINDOWS, and then do a Hello world with Ant, it works fine.. but if I do Android Project….. it also works fine, but gives errors as well. I think the errors just create copies of the .prefs, but when I continue with build.xml, whatever those errors were go absolutely nuts.. Like, fill your hard drive in a few minutes with xCopy nuts.

Obviously, ATI needs to fix it’s updater, but I don’t know whether Ant should be able to deal with the situation better as well. That is to say – if I can call xcopy as a normal user, Ant’s xcopy task should be the same as mine, no?

Also, this is my second tutorial I’ve used. I’ve been working on my first app for a little over two months, and making good progress.. but I had to backtrack a ton after I watched your first 4 or 5 videos, because I realized I actually *was* allowed to follow java best practices, I’d been really frustrated with some of the rules other sites taught me – so thanks for that. I’ve been updating my notes along the way, and at some point I’ll have a really tidy template system built up. If you want me to come back when I’m more confident with the bundle, I’d be happy to share those with your viewers as well, if you’ll host them or point to a git page I could make or whatever.

I suggest it because I think your teaching style is absolutely fantastic – you cover a lot of material extremely quickly. A new developer can definitely know which tool they will need to solve a problem after going through your guide. But when referring to your code for a sixth or seventh time, it gets irksome to find what you’re looking for under all the CrazyTipCalc logic, and the StockQuotes, etc.

So, mostly I have stuff set up like a String Tag and Log.d() for each of the lifecycle calls for Services, Activities, etc. Then Snippets for the relations between XML minimum requirements for using something, which can be easily forgotten…

So right now I’m focused on my app, but each time I use the templates I improve on them a bit for that purpose. Let me know if you want them for your viewers, maybe in a month or so..? If you want an example I’ll pastebin some for you.

I will cover many of the idiosyncrasies of ANT soon. It can be a nasty pain!

Yes, if you are willing to post your thoughts as an Android developer feel free to do so. If you want to publicize your blog I am all for that.

Sorry that I haven’t been able to answer questions here quicker. I have been mobile lately all of the time and i have no easy way to answer questions. I will be back home again regularly now so I’ll be more diligent.

Hi, Derek i recently downloded all the software to develope android applications.Suddenly when i open eclipse i get android development tools, and an error appears in the prefernces box that read could not find folder tools inside sdk C:Documents and settings/John Smith JR/android – sdks. I tried downloding the adt plugin but its already downloded and installed. I looked around did some research i maye have a old version of the adt i dont know for sure but it 22.0.0,i came across some websites that says i need eclipse helios i havn’t got a chance yet to check it out, but i wanna know for sure.I really want to get this resolved my e-mail address is j_smith88248@yahoo.com, thanks

In Eclipse do this Window > Preferences > Android
In Android location locate the folder in which you install Android SDK

You may also want to update Help > Check for Updates

You may also want to set the path
Right click on the My Computer icon and select the properties tab
Select the Advanced tab and click the Environment Variables button
In the new dialog box dowble-click on Path (located under System Variables) and type in the full path location to the tools directory

My Android SDK Manager wont open it just shows a little box saying Location of the android SDK has not been setup in preferences.I tried to fix this by adding the path manually, but my computer doesn’t have a folder called android-sdks or android-sdk or sdk. I need this to start working asap as i have a deadline to finish an android application.I have also tried updating everything (says there is no more updates).
Please Help!

When i am trying to install the package….i keep on getting this error. Please solve this issue.
Cannot complete the install because one or more required items could not be found.
Software being installed: Android Native Development Tools 22.0.1.v201305230001–685705 (com.android.ide.eclipse.ndk.feature.group 22.0.1.v201305230001–685705)

I’ve tried to reinstall Eclipse and the SDK and this hasn’t resolved the issue.

Previously, before uninstalling and reinstalling, and I believe even once after, I had a bunch of other types of errors (I think, as opposed to one consistent error) one of which started “No command output”…

Any elightenment on the matter would be VERY greatly appreciated! (Plus, I just recently out of despiration installed IntelliJ as an alternate IDE potential but I haven’t a clue how to start using it…I’m very new to programming and haven’t taken a single class nor read any great amount of book on operating systems/command line stuff.)

O I should mention that I have deleted AVDs and even tried the AVD suggested on your tutorial – I am using an Linux (Ubuntu) system and I am pretty sure it’s the 32-bit version…(It’s on a dual boot with my Windows Vista on my Dell Inspirion 1720 that I got maybe about six years ago?)

I just saw this. What version of Eclipse are you using? Do you have a computer with Intel or AMD chips? Have you tried using the Windows version of Eclipse? It is a great deal less buggy. Use the Indigo version of Eclipse

I have decided to stick with Indigo because the Juno and Kepler versions don’t support a few plugins that I like to use. I have also had no problems with installing the Android plugin on numerous different OSs in computer labs. That is the only reason

I have followed your advise and it solved most of my problems, however I still have some issues, one is I some times get an error on the emulator saying that “Sorry your app has stopped running” or “The emulator has stopped running” the last time I got this the app was there and came up when I clicked it. Also the emulator is painfully slow but I am using Windows 8 so their is most likely not a solution. Any advise you have would be appreciated.

The emulator speed is not the real problem. For some reason I keep getting a error on the emulator saying sorry your app has stopped running. It seems to load alright but as soon as I select the app the app screen starts to open and the “Sorry your app has stopped running” comes up.

Hello, If you know electronics you pretty much already know how to program. If you know C you’ll have no problem with Java. I have a massive Java video tutorial, but for Android you just need parts: 1 – 7, 9, 11 – 18. You may also want to watch parts 1 and 2 of my design patterns video tutorial. I review OOP in those 2 videos.

Hello! Good day Derek! Your tutorials are wonderful. i’m following your instructions. The problem is, the hello world program doesn’t seem to run. There’s an error in the MainActivity.java that says R.cannot be resolved to a variable. I tried cleaning the project but it didn’t work. How am I suppose to solve this? Thank you!

Ive watched the video but my problem is not in here. All these problems seemed to be able to open the emulator from the the android virtual device manager. Mine does not open the emulator at all. Again, I see the loading bar window appear, but the emulator window never shows up and the loading bar windows closes at about 90% and shows no messages or errors. Please help!

Try running Eclipse as an Administrator if you are on Windows.
Try using JDK 1.6 if you are using JDK 1.7
Make sure you shut down background processes that may be causing a conflict.
Reinstall outside of the Program Files directory if on Windows.
Make sure Java is in your path.
If you are on Linux there are known Audio conflicts that cause crashes

When I run my SDK manager from Eclipse (Indigo), I get this in console. It updates the packages, but I dont know why I get this path thing: I set the path environment variable to platform-tools and tools folder too..

Also for emulator I cannot allocate 1024 of RAM. It doesnt workd! it works with 768.
And even with this I get these lines while opening the emulator:
Starting emulator for AVD ‘myDevice’
emulator: Failed to open the HAX device!
emulator: Open HAX device failed
HAX is not working and emulator runs in emulation mode
creating window 0 0 534 854

Hello Derek i really admire you for you videos i want to say thanks for your good tutorials but i will be happy if you solve my little problem.
Derek actually i am beginner for android development, when i open SDK manager a box pops up notifying that android sdk ping has encountered a problem ,pingUsageserverfailed bad version 22.0.3 within details.

Also i have another problem that SDK manager is still unable to load complete packages it shows following error in log windowsXML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document ‘null’, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not
I have tried every thing you have shown in your video like checking box corresponding to “Force https://… etc.
This problem exists.
Derek please tell me what’s all that and how to fix them.
Thanks Derek

Thank you for these great tutorial on Android development! Thank you so much for sharing your knowledge!

Today, I followed your install tutorial installed eclipse indigo on my Mac. I also installed android developer tools. However, after I created MyFitstApp project, I see gen folder is empty which caused MainActivity.java not complied. I googled it but not successful. In addition, I cannot find Android SDK Manager location by searching the bundle. Please help!

I noticed that you have the same mac laptop as mine. I got an error on installing the intel HXM hotfix(1.0.7). “VT/NX not present ” which prevents me from selecting x86-based AVD option.

You indicated you installed Intel Hardware Accelerated Execution Manager (HAXM) release_1.0.4-hotfix. But I tried to install 1.0.4 hotfix, my machine says that I have a later version installed. Which version do you have when you installed using Android SDK manager?

Do you have any suggestions for me?

1. How to make VT/NX present?
2. Which hotfix version should I install to workaround the problem #1.

I have mac os 10.6.8 and my emulator is very slow. The links for the Intel Hardware Accelerated Execution Manager, are different from what you provided in the video.

There are two links for mac os X and the second link (Hotfix for OS X 10.9 only (1.0.7)) is not compatible with my system. And the first link(haxm-macosx_r03.zip (1.0.6) ) is not what you showed in your video.

Hello there, I’m sorry if I’ve somehow missed it, but even though you said you’ll “Solve the Android SDK parse error problems.” I couldn’t find any references to them in the video or on this page.
I keep getting these errors:

It was recommended on Stack Exchange that I delete my ‘C:\User\___\.android’ folder and restart Eclipse to get rid of these parse errors. Needless to say, that didn’t work. All the relevant packages have been successfully installed using the SDK Manager. I tried various combinations of the “clean” option in Eclipse, and building my project manually as opposed to having it done automatically. I’ve spent days on troubleshooting these and various other issues and I’d be greatly indebted if you’d help me out here!

I am a newbie in android application development. i have started to setup the development environment and have installed SDK and eclipse latest version. my computer (DELL Inspiron 1454) doesn’t have hardware virtualization technology therefore I can get the android virtual device run in my computer. is there no way to have an AVD or an alternative if there is to HVT support in your pc?