devfish.net .... >««(o>...

developer stuff by Joe Healy

Error: x86 emulation currently requires hardware Acceleration - Android on Windows

IMPORTANT - READ ME - YES YOU: At least for me, the exact ORDER of the steps below was important. I tried updating the driver in Device Manager a couple different ways and continued to get the yellow triangle of doom on my VIVO AIR in Device Manager. Follow the steps below or CAVEAT EMPTOR.

THE OWIE

I ran into quite a interesting situation trying to get the Android emulators running. I installed Android Studio and it seemed to be working great.  But when I attempted to run to the emulator for the first time, specifically to the "API22 Nexus 5" I received a "ERROR: x86 emulation currently requires hardware Acceleration" error. I dug in the tools for the command line for the emulator:

C:\Users\Joe\AppData\Local\Android\sdk1\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_5_API_22_x86

When run, the command gave me a whopper of a confusing error.

ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!

Double clicking on emulator in AVD gives same error in popup with the link to http://developer.android.com/tools/devices/emulator.html#acceleration .

Ok, time to troubleshoot. First I used the Android SDK Manager and install HAXM.

Navigate to "sdk\extras\intel" and run the HAXM installer. Oh no, a whole new error message:

VT not supported. This computer does not support Intel Virtualization Technology (VT-x).
HAXM cannot be installed.
Please refer to the Intel HAXM documentation for more information.

SOLUTION

Hyper-V, HAXM? Both emulation technologies running at a low level, yes? Possibly a conflict? So I turn off Hyper-V, try the Android emulator again, and it works. As they say on the Geico commercial, "So I break into my happy dance".

WORKING WITH HYPER-V

The solution to getting Android Studio Emulators working in my World? Turn Hyper-V off. But you may have to turn it back on again. There are two routes to enabling/disabling Hyper-V.

First is the Services administrator program. In Win8/Win10 just type "services", click on Services, and up will come the Services control program. Find the Hyper-V entry and disable/enable it. I personally recommend a reboot of your computer.

Another route to disabling/enabling Hyper-V is to run the bcdedit program to change the launch of Hyper-V. BCDEdit (boot command edit) allows you to change to boot options of the computer. More information here - https://technet.microsoft.com/en-us/library/cc709667(v=ws.10).aspx  .

TURN HYPER-V OFF
bcdedit /set hypervisorlaunchtype off

Then reboot the computer.

TURN HYPER-V ON
bcdedit /set hypervisorlaunchtype auto

Then reboot the computer.

Hope this helps you with getting your Android emulators working on Windows. Lots of fun to be had yet. Watch devfish.net and I'll keep you posted as I play more.

“Any AI smart enough to pass a Turing test is smart enough to know to fail it.” ― Ian McDonald, River of Gods

IDFLinkable - August 17, 2015 - Win10, BootCamp, Machine Learning, Android

Things cool and interesting in the Microsoft Developer Platform as it pertains to Florida and the Microsoft Developer scene, as well as various tech things I'm into.  

WINDOWS 10

  • NetFlix app won't stream fix - http://windowsinstructed.com/fix-windows-store-netflix-app-error-0x80070057/
  • How Microsoft is Improving the NFL with Surface 3 Tablets on Sidelines and New App in Living Rooms - Weather durability, pen usage, real time-on-the-field feedback - http://www.techtimes.com/articles/74841/20150807/microsoft-improving-nfl-experience-surface-pro-3-tablet-sidelines-new.htm
  • Boot Camping a Mac with Win10 Guide - http://www.theverge.com/2015/7/29/9058825/windows-10-macbook-how-to-install-osx
  • Mac Boot Camp support software for Windows 10 - https://support.apple.com/en-gb/HT204923
  • Number picker control - Number Picker Control - http://blogs.msdn.com/b/practice-sharing/archive/2015/08/16/xmal-create-your-own-number-picker-control-for-windows-phone.aspx
  • Using the XAML Live Visual Tree Debugging Against Windows 10 Core Apps - Using the XAML Live Visual Tree Debugger against Windows 10 Core Apps - via @billreiss
  • WINDOWS 10 - PHONE SPECIFIC

    AZURE

    OTHER

    Android USB / ADB Drivers for BLU Phones - VIVO AIR

    FRUSTRATION

    I'm working through some Android native development labs and such.  One of the steps is to install the Android USB Device driver for your phone.  Normally, you had over to http://developer.android.com/tools/extras/oem-usb.html , find your phone in the list, and away you go.

    The USB drivers installed to support the Android Debug Bridge - http://developer.android.com/tools/help/adb.html.  The ADB enables you to debug directly against a device instead of the emulator.  They also allow normal things like browsing to the phone via File Explorer on a Windows computer.

    My little Android phone is quite nice. $170, no contract required, off off amazon type thing.  The BLU VIVO AIR  ( http://amzn.to/1TH9tai ) ,  running  Android 4.4.2 / kernel 3.4.67 Build: BLUE_D980I_V11_GENERIC 12-02-2015 09:14.  http://www.bluproducts.com/index.php/vivo-air .

    So naturally, I assume, "Oh my, Google left out BLU from their OEM" list.   So I call BLU.  http://bluproducts.com/index.php/contact-service#sales .  BLU responds and says drivers are not available.  WTH.  They told me to dig around in http://www.bluphoneparts.com/blu-vivo-air-iv-4-3-4-65-4-8/ .  Bunch of screens and such, but no USB drivers.

    So I take it to twitter to try and get something. Direct message and public message to https://twitter.com/BLU_Products .  No response.

    Then I post them on Facebook - direct message.  https://www.facebook.com/BLU.Products . No response.

    RESIGNATION

    This is annoying on so many levels.  First, as a dev, this means I cannot debug directly to the device.  I also cannot browse to the phone using File Explorer without the USB driver.  Bad BLU!  I still like the phones though.

    EXPLORATION

    There has got to be a solution somewhere.  So I dig in.

    I could install the drivers from androidxda. But I really don’t know who posted them or if they contain some kind of internal nastiness - http://androidxda.com/download-blu-usb-drivers . Use at your own risk.

    BLU VIVO AIR has the MediaTek chipset - http://www.bluproducts.com/index.php/vivo-air -
    Processor Mediatek 1.7 GHz Octa Core with ARM MALI-450 GPU  .  So I tried installing their Android USB drivers for MediaTek from  http://online.mediatek.com/Public%20Documents/MTK_Android_USB_Driver.zip
    The MediaTek drivers did not work either.

    Next up was to install the Google Generic USB driverThis worked.  Note it took me 2 reboots as well before it recognized the device.  Not the most straight forward process either, so below will share how to get the driver going.

    SOLUTION

    Use a USB cable to connect the Windows PC and your phone .   
    Open up Device manager.  You'll see the BLU VIVO AIR show up in "Other Devices" as unavailable.

    Download and install the Google Generic USB Driver from  http://developer.android.com/sdk/win-usb.html#top .
    Note down and remember the location where you install the  google driver to.


    Right mouse the BLU VIVO AIR, select Update Driver Software…

    Select "Browse for driver software on your computer"

    Navigate to where you installed the Google USB Driver software

    Select "Let me pick from a list of device drivers on my computer"

    Select "Show all devices"

    Select "Have Disk"
    Navigate to where you installed the Google USB driver, select the android_winusb.inf file

    In the Update Driver Software - VIVO AIR dialog select "Android ADB Interface"

    Ignore the "Update Driver Warning" message.

    You will now see the Android Device -> Android ADB Interface in Device Manager, and VIVO AIR will be gone from "Other Devices". You should now also be able to turn on things like USB/Mass Storage Mode on the phone so you can view files from Windows Explorer as well as debug to the device.


    This cost me some serious time. I hope it saves you the time. Frustrating. I love my BLU phones, but their level of support on this was horrible.

    “Hate lawyers all you want. Unlike you, we'll never be replaced with robots. Case closed!” ― Amanda Mosher - Better to be loved than lovable ....

    Error: Invalid Gradle JDK configuration found. Open Gradle Settings. Platform SDK does notpoint to valid JDK

    So I thought I had everything ironed out with my JDK versioning errors after installing 1.8 JDK over 1.7 JDK.  But... I start working through the super simple "Happy Birthday" sample from Udacity's free Intro to Android Studio Class.  Setup a new project and woopsy, get the following:


    Course of action to correct.

    In Android Studio, navigate to File -> Project Structure -> SDK Location

    Set the JDK location to the 1.8 (or whatever is current) correct SDK you wish to use. 

    Hopefully all joy and happiness after that. 

    I don't know if this fixes the JDK location for all projects.  If it doesn't, there will be another post coming shortly.



    "An android," he said, "doesn't care what happens to another android. That's one of the indications we look for."  "Then," Miss Luft said, "you must be an android.”
    ― Philip K. Dick, Do Androids Dream of Electric Sheep?

    ERROR: java-version '1.7' is required / could not find java.dll / could not find Java SE Runtime Environment

    I've been learning Android and had installed Java 1.7.  I installed Java 1.8 to get the latest version.  After installing I opened a command prompt and typed in "java -version" to make sure everything had installed properly.  Woops, got the nastiness below!

    C:\windows\system32> java -version

    Error: Registry key
    'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.
    Error: could not find java.dll
    Error: Could not find Java SE Runtime Environment.

     

    Lots of hits out there about modifying registry and deleting files to fix the error.  Those seemed messy.  Here's a simpler fix that worked for me.

    • Open Control Panel\All Control Panel Items\Programs and Features
    • Uninstall new version of java (1.8)
    • Uninstall old verrsion of java (1.7)
    • Reboot
    • Install java 1.8
    • Set java_home to new variable via ENVIRONMENT to point to the java 1.8 path

    Good to go after that point.

    C:\windows\system32>java -version java version
    Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
    Java HotSpot(TM)64-Bit Server VM (build 25.51-b03, mixed mode)