Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVD not running

Today when I was doing my project using android studio, a blue screen suddenly appears and system get restarted automatically. And now when I tried to run my app using emulator, the AVD is not running and I get an error as below. Anyone faced this before ? How do I fix this?

ProcessNotCreatedException: Unexpected error while launching AVD: Cannot run program "C:\Users\tongws\AppData\Local\Android\sdk\tools\emulator.exe": CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher

enter image description here

Wnen I click the Android Device Monitor, nothing happen also...

like image 368
Hoo Avatar asked Oct 29 '15 15:10

Hoo


Video Answer


2 Answers

Found the following solution. Go to the following directory in your computer:

C:\Users.android\avd

Inside this directory you will find all files and directories with the definition and content of your avd machines-

Now do the basic troubleshooting steps:

-check if the avd directory exists and if it contains a file with the name "sdcard.img".

-if the file exists, try to rename it (to check if its locked) and then go to eclipse and ask to create a new sd card.

-if it fails, try to create manualy a file with that name to check premissions.

good luck

like image 98
Nouman Ghaffar Avatar answered Oct 18 '22 00:10

Nouman Ghaffar


You have a computer problem not related to AVD

ProcessNotCreatedException :Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception.

Because of their usefulness and ubiquity, EXE files are commonly used as a method of delivery for virus / malware infection. Often, viruses will be disguised as a benign EXE file (such as emulator.exe) and distributed through SPAM email or malicious websites, which can then infect your computer when executed (eg. when you double-click the EXE file). In addition, viruses can infect, replace, or corrupt existing EXE files, which can then lead to error messages when related programs are executed. Thus, any executable files that you download to your PC should be scanned for viruses before opening - even if you think it is from a reputable source.

Read SO Answer .

What should you do

  • FORMAT Your System
  • Install Android Studio (Set Latest Version With Proper JDK Path)Note that you need to have JDK 6 or higher installed.
  • You can use Intel x86 Emulator Accelerator (HAXM installer) or Genymotion .

IF YOU HAVE MULTIPLE DRIVES, THE DRIVE WHERE THE OS IS INSTALLED IS NEEDED TO BE FORMATTED, SO YOU SHALL LOSS ALL DATA OF THAT DRIVE. I SUGGEST YOU TO TAKE A BACK UP OF ALL YOUR IMPORTANT DATA STORED IN THAT DRIVE, INTO OTHER DRIVES WHICH WOULD REMAIN UNCHANGED. ON THE OTHER HAND, IF YOU HAVE ONLY ONE DRIVE, THEN ALL YOUR DATA WILL GET ERASED WHILE FORMATTING .

enter image description here

like image 45
IntelliJ Amiya Avatar answered Oct 17 '22 23:10

IntelliJ Amiya