• 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

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

  • 40
Reply Report
      • 2
    • You can also call wipe data from command line with sdk tool emulator.exe (using xamarin on windows my android sdk path is C:Program Files (x86)Androidndroid-sdk ools) with the command emulator -avd my_avd_name -wipe-data. You can also list avd names with comand emulator -list-avds

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 !

  • 10
Reply Report
      • 2
    • Raphael is right, downvoter sucks. When I created this environment variable and set it to a directory not containing latin2 character, it started to work again. Btw do not get fooled by variable name. The variable must not point to a location of the SDK. It is preferences location variable.

I had this problem on my Visual Studio 2017 Community development setup and here is how I solved it:

  1. Shut down the AVD if it's running.
  2. While in the Android Device Manager, select the AVD with the problem.
  3. Right click or select the context sensitive menu and select "Factory Reset".
  4. 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.

  • 9
Reply Report

In VS2017 version 15.9.3,perform the following steps :

  1. Open **Tools > Android Device Manager ** and search the device that you debug
  2. Click with Right Click on it
  3. Choose "Factory Reset" enter image description here
  4. And you will get brand new device, ready to debug.

Good Luck!

  • 5
Reply Report

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.

Edit Device screen

  • 3
Reply Report

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.

  • 1
Reply Report

Try this:

  1. Shutdown the AVD (if it's running).
  2. 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
  3. Remove any blank line from the beginning and the end of the file.

  4. Finally, run your AVD directly from the AVD Manager.

hope this helps.

  • 0
Reply Report

This solution working for me on VS2017/Xamarin

  1. Turn Off your device
  2. Open MS-DOS console
  3. 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

  1. Turn Off your device (no more password is needed)
  2. 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

  • 0
Reply Report

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 :)

  • -1
Reply Report