Saturday, November 25, 2017

[Solved] Android Studio : Android emulator is incompatible with Hyper-V

Have been lately doing Android development. Ran into a minor problem. So I have two machines, a desktop and a laptop. I set the project on my desktop and everything was working fine (read AVD). Checked in to the code to a GIT repo. However when I was checking out the code on my laptop Lenovo T470s, I ran into a problem with starting the AVD (Android Virtual Device) Manager.

It would show me this error.




Intel HAXM is required to run this AVD.
Android Emulator is incompatible with Hyper-V.
Unfortunately, you cannot have Hyper-V running and use the emulator.
Here is what you can do:
  1) Start a command prompt as Administrator
  2) Run the following command: C:\Windows\system32> bcdedit /set hypervisorlaunchtype off
  3) Reboot your machine


The first thing I did, disabled Hyper-V from my BIOS setting after restarting the system. However then I still kept on getting this error. Then I disabled Hyper-V feature from the 'Windows Feature on or off' settings.



Then I finally installed the HAXM tool from intel's Website (Hardware Accelerated Execution Manager) and things started working smoothly for me.
Hope this helps. 

Sunday, November 05, 2017

[Windows] Refreshing Environment variable for windows command prompt or Powershell

Sometimes, after installing a package like chocolatey,or npm packages, it asks you to restart the cmd.exe or powershell window to reload the new registered path, for the new commands/settings to work. 

Well most of the case, it is not a big issue, but sometimes I just hate having to do away with my command history. So whats an easy workaround to do, run refreshenv

In cmd.exe (Command Shell) run : 

C:\Windows\system32> refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait... Finished..
In Powershell:


PS C:\Users\parag> refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..
PS C:\Users\parag>
Enjoy working in the same window without having to part with your command history. 

[Solved] Android Studio : Android emulator is incompatible with Hyper-V

Have been lately doing Android development. Ran into a minor problem. So I have two machines, a desktop and a laptop. I set the project on ...