Android virtual device not starting - android

Two days ago my android studio was working well then I don't know
what happened I got this problem.
When I hit the play button before it used to launch the emulator but
this time it didn't launch.
Then I tried to start the virtual device manually going to Android
Virtual Device Manager but it only says "avd starting" but nothing
happens.
Then I deleted the existing device and created a new virtual device
but nothing happened.
Then I restarted the Android studio deleting all the files in root
directory of the android studio and started again with default
settings downloaded all the required files but this time also
the virtual device didn't start.

I realize this question is old. Regardless, for anyone that may experience the same problem; as I had, here is what I did to resolve the issue:
Locate the windows "Android SDK Location" which is the path to your emulator:
In my case, it is here: C:\Users\profile_name\AppData\Local\Android\Sdk
Try running the device at the command line at the sdk path shown above like this:
sdk_path_from_step_2\emulator -avd "name of device"
If you have the same problem I did, the path was wrong in my system variables
To fix it do the following:
Open your system properties; (sysdm.cpl at a command prompt)
Select the Advanced tab
Click on the "Environment Variables" tab.
Ensure that your have a variable named ANDROID_SDK_ROOT with the path to your sdk you saw in step 2
Add or Update the System Variable to match what you find in Step 2.
In my case it looks like this

Related

Cannot launch AVD in android studio

I know this question have been asked so many times but I have exhausted all the options on SO and other platforms as well and idk what to do anymore. I have installed HAXM, I have tried to set the path to the right folder, installed/uninstalled the thing, and what's worse I tried to uninstall again today and there is an error saying it cant find uninstall.exe I have an important project in another 2 months and my phone's USB port is faulty so I cant run my apps in it. please help
First of all go to the folder where you have installed your Android Sdk and if you don't know then go to File in Android Studio and select Project Structure like this
Then Select Sdk Location where you will get the path of your Android Sdk.
Then go to AndroidSdk/emulator folder and open cmd,
Then type this command ---- emulator -list-avds ----
After that you will get list of the emulators installed and then run another command ---- emulator -avd "The exact name of device you want to run" and press enter.
The emulator will start if it doesn't it means you have some errors in system - image. You can solve it by deleting the previous system image then download new one.
The slashes are just to differentiate the command, nothing else.

Android Emulator "To Start Android, enter your password" and it reminds me the password is wrong"

I just installed Android Studio, when I run the Android Emulator it says: "To Start Android, enter your password" and it reminds me the password is wrong".
How can i fix it?
I would be very glad if someone has an answer for this
Wiping data in Android Virtual Device Manager works for me.
Tools -> Android -> AVD Manager -> Actions (triangle down) -> Wipe Data
Setting the ANDROID_SDK_HOME as described in a previous answer didn't work for me (although it did start using the folder I specified, placing a new .android folder there and using it)
Neither did doing a Factory Reset by right-clicking on the device in the Android Device Manager in Visual Studio 2019.
The only thing that worked for me was making sure that the checkbox for Google APIs was checked, and making sure it was on x86 of course; selecting x86_64 grays out the two checkboxes.
Note that it doesn't matter whether I use a Pixel or some other device such as a Nexus; it apparently always needs to use the image with the Google APIs.
I had this problem on my Visual Studio 2017 Community development setup and here is how I solved it:
Shut down the AVD if it's running.
While in the Android Device Manager, select the AVD with the problem.
Right click or select the context sensitive menu and select "Factory Reset".
Start the AVD again and it should boot normally.
*Just be sure that all the data you've saved on the AVD will be lost once you factory-reset it.
Windows
Hyosoo Kim is right about the problem (non-ascii characters in the user directory), but I think this is an easier solution :
Add a new User Environment Variable :
Control Panel -> System -> Advanced System Settings -> Environment Variables
Add a new user variable
Name : ANDROID_SDK_HOME
Value : the path to a directory not in your user home (C:\Android for example)
There you go !
In VS2017 version 15.9.3,perform the following steps :
Open **Tools > Android Device Manager ** and search the device that you debug
Click with Right Click on it
Choose "Factory Reset"
And you will get brand new device, ready to debug.
Good Luck!
If your user directory contains non-ascii characters, then try to change user name to English name.
I had same problem and it was solved when I logged on to root account.
My case was the described by Hyosoo Kim. I solved the problem renaming my user profile folder (following these intructions Change the Name of a User Profile Folder in Windows 10) and deleting the folder .android under my profile folder.
I had the same issue but was using Visual Studio 2017 and Xamarin rather than Android Studio. Doing a Factory reset in the Android Device Manager in Visual Studio didn't work for me.
So I installed Android Studio and as per Yao's answer, launched the AVD Manager from in there then selected 'Wipe Data' from the triangle dropdown. This resolved the issue and I was able to use the emulator from within Visual Studio again.
The Android Device Manager in Visual Studio seems to be missing some features compared to the one in Android Studio, so this solution is the only one I could find that worked.
I had this issue when trying to use the x86_64 processor, even when I created a brand new device. Using the x86 processor in the device properties resolved the issue for me.
Open
...\USER.android\AVD_NAME.avd\emulator-user.ini
There's a "uuid" which contains the password.
For example:
uuid = 1568486155483
And 1568486155483 is the password.
Worked 4 me :)
This solution working for me on VS2017/Xamarin
Turn Off your device
Open MS-DOS console
Start your device with following command:
emulator.exe -verbose -feature WindowsHypervisorPlatform -avd
"My_device_name" -prop emu.uuid="your_id" -skip-adb-auth -wipe-data
Turn Off your device (no more password is needed)
Launch your device with 'Android Device Manager'
More information will be available in your log file:
See most recent file here:
C:\Users\"my_account_name"\AppData\Roaming\XamarinDeviceManager
Try this:
Shutdown the AVD (if it's running).
Go to the config file of this AVD, The default location is the following (where AVD_NAME is the AVD name, and USER is your system user):
Mac and Linux: ~/.android/avd/AVD_NAME.avd/config.ini
XP: C:\Documents and Settings\USER\.android\AVD_NAME.avd\config.ini
Vista - C:\Users\USER\.android\AVD_NAME.avd\config.ini
Win10, C:\Users\<user>\.android\avd\Android_Accelerated_x86_Oreo.avd\config.ini
Remove any blank line from the beginning and the end of the file.
Finally, run your AVD directly from the AVD Manager.
hope this helps.
Go to your Users folder > .android > avd folder > then delete the avds configuration or wipe out everything.
Then go back to your VS and click Android Emulator. VS will show you their recommended configuration. Use that and run your project with that emulator.

android studio - emulator doesn't work and genymotion doesn't get recognized

I'm building an app in Android Studio (beta) 0.8.9, though I can't seem to get emulators running. I've made a Nexus 4 and 5 emulator through the options, but I can't seem to get them started. It shows this in the Run App tab.
Waiting for device.
"C:\Program Files (x86)\Android\android-studio\sdk\tools\emulator.exe" -avd smallEmulator -netspeed full -netdelay none
So either it's not starting up, or I'm just an impatient SOB.
I've also downloaded Genymotion and started up an emulator through that, but now Android Studio doesn't recognize the emulator anymore. I try to run my app and check for any running devices, but it doesn't show up, despite the fact that it actually is running.
I've added the Genymotion plug-in, to no avail. No idea what went wrong.
I also have a One Plus One, which I'm not sure how I can debug on that. They don't seem to have drivers for that and haven't immediatly found anything on Google so far.
Any help would be much appreciated.
EDIT: I fixed my problem. I used Genymotion to fix the problem. The running emulator wasn't turning up, because the android SDK's weren't linked to one another. Genymotion and Android Studio used different ones. So I edited Genymotion's settings to use the same one of AS and now it works!
First of all, update android studio. Check if the emulators run from the AVD manager outside Android Studio, I mean by starting it up manually from ur SDK installation folder (AVD Manager.exe) . Check the path of ur emulator in .ini file in C:>Users>user-name >.android>avd. U can make a system variable for ur SDK folder "ANDROID_SDK_HOME" and place the .android folder's content there (the whole .android folder). Sometimes "resetting the adb" after u run emulator may work.
There may be an easier fix than what was previously mentioned. Try opening Android Studio, go to File, Settings, plugins. Select the “Browse Repositories” button at the bottom of the page. Scroll down the displayed page to find “Genymotion”; select it and install it.
When it has installed, restart Android Studio. Again, go to File, Settings, then go to Other Settings. Genymotion should show up as an option. There will be a field that asks for the path to the Genymotion folder.
Mine was: C:\Program Files\Genymobile\Genymotion. At any rate, enter the path, click Apply or OK and Android Studio should recognize Genymotion (You may need to restart AS once again). Now you should have a small red icon on Android Studios tool bar; when you hover over it a pop up that identifies it as “Genymotion Device Manager”. Click on it, select a device to load, click start and allow the virtual device to start completely. Now run your Android Studio project; the Android Studio “Device Chooser” will pop up. You should see the Genymotion device you’d started previously, select it and you’re good.
Hope this helps…

Android SDK Emulator wont open in eclipse

I Have the whole Eclipse Android sdk working. Everything but the virtual device manager. I downloaded to Bundle from androids website, installed java JDK into the eclipse folder, then housed the entire bundle in a folder on my desktop. When I go to hit the "Androd Virtual Device Manager" button, nothing happens. Nothing at all. It used to work ( i could never run the program though, I could just open the window to make anew device)
Make sure you have properly installed/updated sdk to the latest version
https://developer.android.com/sdk/installing/adding-packages.html
Try running the C:\android-sdk-windows\AVD Manager
I had the same problem, I am running windows 7 home basic on my laptop.
Do the following steps :
You need to first copy your entire java folder(the one containing the java sdk) to a location where administrator rights are not required.
Change the path variable by going to the advanced tab in My Computers and adding a new environment variable.
once you do that, go to the folder where you have your entire android sdk and in its parent folder search for the file named android.bat.
go to the properties of the file found and copy the entire address
go to cmd and type-cd"the path you copied".
you are in the tools folder and now type android.bat and press enter..
it takes some time like 30-40 sec and then opens our beloved sdk manager, and you are there.

how to resolve this emulator: ERROR: unknown skin name 'WVGA800' solution

i am trying to start the android emulator from eclipse classic (juno)
and it keeps giving me this error:
ERROR: unknown skin name 'WVGA800'
I developed my software using eclipse indigo, but since I installed eclipse juno and imported the same project it started to give me this error. any idea why? and how to resolve this issue?
My solution was to create a new custom virtual device from the android virtual device manager and use that.
For me on Mac OS X this error went away when I selected the skin in advanced setting it was saying is unknown.
I had the problem and fixed it... Here the main idea of the issue is that the emulator can't find your android-sdk base directory.. so what is the fix? here I will explain..
Find where you have installed your sdk. To do so go to Start->All Programs->Android SDK Tools->SDK Manager.. You will see that the path is written on the top of the window.. copy it somewhere so we need it later.. call it "SDK Path"
Go to Start and Right Click on Computer and select "Properties".. Then select the last option on the left menu which is "Advanced System Settings".. Go to the "Advanced" tab and click on the "Environment Variables.." on the first list see if there is a variable called "ANDROID_SDK_ROOT".. If it's there then check if the value is the same as the "SDK Path" we copied in the step 1.. if they are not the same then change the value of it to the SDK Path...and check if your problem is solved. if not then go to step 3..
If the "ANDROID_SDK_ROOT" matches the SDK Path or your problem didn't solve in step 2 then the problem is probably caused by your username.. This was my actual problem. my username had special characters in it like ( !,#,#,... ) or even spaces in some times. Speaking technically as I am myself a programmer, when the emulator program was trying to open the path, it was giving out an error because it couldn't open it because of the special characters..Guessing that the SDK is installed in your Local App Data folder ( Users\\AppData\Local ) as mine was, you should access it with another Enviroment Variable called "LOCALAPPDATA" which links to your Local App Data folder.. So in your SDK Path change the "drive:\Users\\AppData\Local" to "%localappdata" and your problem will be solved .. For example mine was "C:\Users\MiNuS !3\AppData\Local\Android\android-sdk" and I changed it to "%localappdata%\Android\android-sdk"... (without the double quotations)..
The same problem is present in some other java programs. I had the problem with the Zend Studio too...
Hope it will solve your problem,
Good Luck
I bumped into the same problem in Android Studio on Mac OS X 10.6.8 and there it helped to create a new AVD with target API Level 17 (the only one available after the standard setup it seems). None of the pre-existing AVDs work, however, only the new one (the old ones all use target APIs lower than 17).
The path to where it looks for the skin is in the ~/.android/avd/$deivce-name$.avd/config.ini
My issue like this occured because I had copied an avd to a different computer and the path was incorrect on that new computer.
One solution, if you're happy to do this, is to not use a skin. To do this:
1> Tools/AVD Manager
2> Select the device
3> Click the pen icon in the "Actions" Column
4> Uncheck "Enable Device Frame"
Alternatively, if you want to select a preexisting skin, you can click on "Advanced Settings" and scroll down to the "Custom skin definition" drop down box.
And to see instructions on how to create a custom skin, you can click on "Advanced Settings" and scroll down to "How do I create a custom hardware skin", which links to here: https://developer.android.com/studio/run/managing-avds#skins
I had the same issue as I moved my avd files between systems and as in your case you have moved the relevant files. So the solution as to go to the .android folder and make changes to the files with .ini of conf in their names. In there you will see that the paths to various resources are different as a result of the move you made. So put in the correct path values.
That was how I solved mine.
You may need to update your AVD manager. WVGA800 is the default skin for the emulator. You might try to update your software
As you upgrade your Android Studio, the skin.path value can become no longer valid. The best approach is to copy the set of screens to your own folder path. This way the screens are in more permanent folders.
For example for Macbook:
Find ~/Applications/Android Studio 1.5.1.0.app/Contents/plugins/android/lib/device-art-resources
Copy device-art-resources folder to a place like ~/dev/device-art-resources
For each config.ini in each of your avd folder, change skin.path value to point to the screen of your choice
For SDK-only installed
For who has not installed Android Studio but has only the SDK, to add a new device, or change a skin to an old device is
$ANDROID_HOME/tools/android avd
My solution was to change the skin to nexus 5x !!
I solved by uninstalling and reinstall the emulator.
In Android Studio, go to:
Tools -> SDK Manager
Appearance & Behavior -> System Settings -> Android SDK
SDK Tools tab
Uncheck the Android Emulator check box, and hit the Apply button.
Do the same, checking the Android Emulator check box.

Categories

Resources