Android Studio 2.0 Cannot launch AVD in emulator - android

I can successfully launch AVDs for the targets Android 5.1 (Google APIs) and Android 6.0 (Google APIs), both using CPU=x86. However the AVD I create for Android 4.1 (Google APIs) using CPU=arm cannot be launched. When I try to launch it I see a dialog:
Cannot launch AVD in emulator.
Output:
emulator: ERROR: This AVD's configuration is missing a kernel file!!
emulator: ERROR: ANDROID_SDK_ROOT is undefined
Since two AVDs do work I'm sure ANDROID_SDK_ROOT is defined. I've also verified that File -> Project Structure -> SDK Location is correct.
I have also run the Android SDK Manager, uninstalled all API 16 items and reinstalled these API 16 items:
SDK Platform
Intel x86 Atom System Images
ARM EABI v7a System Image
Google APIs
Sources for Android SDK
Within the Android SDK Manager all other libraries and packages are up to date. And I have restarted my Windows 7 computer.
Also note that I am forced to create this API 16 AVD for CPU=arm rather than using CPU=x86 as the Android Virtual Device Manager, when showing available system images, does not show an x86 image for target=Android 4.1 with Google APIs).
Does anyone know what the problem is? Or suggest things I can try to debug this issue?
Edit from a day after opening this question: Since I've seen no answer I'm assuming this is another Android Studio bug. I've input this bug report - https://code.google.com/p/android/issues/detail?id=207494

I got same error while trying to run ARM based emulator which is of API 16. I got this error when ARM images are downloaded from the android-studio itself( Not using Standalone SDK Manager option under System Settings->Android SDK in android-studio).
I solved this by launching Standalone SDK Manager from android studio. Then open Tools->Manage AVDs from Standalone SDK Manager menu. Here you can find your emulators. I observed that my ARM CPU emulator shows question marks in the columns named Platform,API label,CPU/ABI. Which seems to be some sort bug. Select the Emulator and click on edit. Choose the Target API,CPU/ABI properly and then click ok.
Now my emulator works perfectly. This solved my problem.
I figured out that updating android-studio caused this problem for me.

Related

AVD Manager - "No system images installed for this target." on API level 23

i need to test Google Maps Android SDK v2, so I downloaded fallowing SDKs:
Unfortunatly AVD is throwing message, that no images are installed. I tried to to move content of system-images according to many similar threads and it did't help.
My system-images structure:
EDIT:
I reinstalled Mac and installed Android Studio (AS) and I found, that if I download Google API System Image with AS AVD, Standalone AVD found it broken. Same with Google API:
EDIT2:
reported on code.google.com LINK
I would really appreciate if someone found solution.
After week I finally found a solution. Now I'm using AVD in Android Studio instead of Standalone AVD and it's working like a charm.
Broken Standalone AVD:
usually located there: ~/Library/Android/sdk/tools/android avd
[thread][https://code.google.com/p/android/issues/detail?id=214557] I created on code.google.com
if you download system images / SDKs with Android Studio AVD -> Standalone AVD found it broken
Working Android Studio AVD:
command line access no longer supported - use tool in Android Studio Tools -> Android -> AVD
if you previously downloaded system images / SDKs from Standalone AVD, you should delete them and download them again via Android Studio AVD

Starting an android emulator

I'm running OSX 10.10.3
I'm trying to make an AVD but am having issues.
I followed these instructions http://developer.android.com/tools/devices/managing-avds-cmdline.html and http://cordova.apache.org/docs/en/5.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
I run
$ android create avd -n first -t 2 --abi default/x86
Android 5.1.1 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Error: Unable to find a 'userdata.img' file for ABI x86 to copy into the AVD folder.
Error: AVD not created.
I have many sdks and images installed but for whatever reason the avd creation tools can't locate them. How do I fix this?
Here's what my sdk manger looks like
It looks like your answer is in the screenshot: "This AVD may not work unless you install the Google APIs Intel Atom system image for API 22 first."
You say you have "many sdks and images installed" but please verify that you have that one in question installed.
Also, you can try creating the avd with the armeabi system image instead of the x86 one.
Also, the Google APIs have a different system image than the "plain" SDK targets.
Look your sdk manager image.
You must check:
Intel x86 Atom_64 system image.
Intel x86 Atom system image.
And create the AVD again.
I ended up deleting my sdk tools directory. Reinstalling the stand alone sdk-tools and android studio. Then the SDK manager redownloaded all the necessary images.

How to resolve error message: "This AVD may not work unless you install...first"?

I'm trying to create an AVD for Android 5, but it's giving me a warning
This AVD may not work unless you install the Google APIs Intel Atom (x86) system image for Android 5.0 (API 21) first.
But I have that installed - this is a screenshot of my SDK manager with the correct System Images installed:
And this is how I'm configuring my AVD:
Am I doing something wrong? How can I get this to work?
Install Android SDK Build-tools 21 or higher
and check Use Host GPU
Finally I managed to resolve this issue manually...waiting for a fix by Big G:
Searching between all the various .ini files generated by Android AVD Manager, I found hardware-qemu.ini(its location is %USER_FOLDER%/.android/avd/yourAVDName.avd/hardware-qemu.ini).
It contains a row starting with kernel.path pointing to the wrong google apis location. Once changed it with the right one
(e.g. path_to_android_sdk/system-images\android-19\google_apis\x86/kernel-qemu for Google API 19 version)
the emulator started with the right Android version, containing Google APIs.
Hope this helps all Android developers :D
You will need to install the HAXM driver on your machine in addition to downloading the components. This step is done outside the Android tools.

Empty data directory in Android virtual devices

I downloaded the Android SDK and installed it at C:\AndroidSDK on Windows 8. After installing several APIs, tools and extras with the Android SDK Manager, I created two AVDs of the 4.0" WVGA, one using ARM (armeabi-v7a) and one using Intel Atom (x86). Both used API level 15. I started both from the AVD Manager but they both had black screens with "Android" in the middle. A splash screen was never displayed and when I looked at the emulators with adb shell and eclipse DDMS, the data directories were empty.
What can I do to fix this problem?
[NOTE: I had previously tried to install an apk file on an emulator but received an error that data/local/tmp was not found. I then completely uninstalled the Android SDK, deleted C:\Users\Steve\.android and did the above.]

Creating Google TV AVD on windows not deteecting x86 System Image

I am trying create the AVD for Google TV on API 13 on windows machine. but while creating, it throws a error asking to install the Intel x86 System Image. but i don't find the x86 system image in the sdk manager for API 13 where as I can see it on other later APIs. (Have already installed it for other APIs)
Could some one please help me fix this and get the Google TV AVD up and running.
I've found workaround for this problem. Tested it on Ubuntu 12.10 but it should work for Windows and Mac OS.
Here are the steps:
download Intel x86 Atom System Image for Android 2.3.3 (API 10) using Android SDK Manager
create folder <sdk-root>/system-images/android-13/x86
copy everything from <sdk-root>/system-images/android-10/x86 into <sdk-root>/system-images/android-13/x86
edit <sdk-root>/system-images/android-13/x86/source.properties file with any text editor and replace next rows:
Pkg.Desc=Android SDK Platform 2.3.7 => Pkg.Desc=Android SDK Platform 3.2
Pkg.Revision=2 => Pkg.Revision=1
AndroidVersion.ApiLevel=10 => AndroidVersion.ApiLevel=13
That's it. Now if you open Android SDK Manager you will see Intel x86 Atom System Image for Android 3.2 (API 13).
Also it would resolve error message while creating AVD with Google TV Addon (API 13).
I had luck to launch emulator and work with it. However there is no guarantee that you would have correct behavior using this emulator.

Categories

Resources