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

    DreamSpark and the Azure Benefit - Stop and Go Tutorial for Activating

    We've got a great offering to get software and services into the hands of startups called DreamSpark. Unfortunately, activating some things, like the Azure benefit, can be a bit awkward. So I've put together a step-by-step walk through on my MSDN blog to help people out. My guide walks a student through activating a DreamSpark account and provisioning up a Web App using the Azure benefit. Surf over to it and check it out.

    Blog article - http://blogs.msdn.com/b/devfish/archive/2015/08/11/dreamspark-and-student-azure-activation-step-by-step-walkthrough.aspx

    Video Link

    Enjoy, and let me know what you think!

    Getting an Azure Account - Six Different Ways

    There are quite a number of folks using Azure out there. If you are just starting out with Azure there are a number of routes to getting started with it. As of this post in August 2015 I've identified no less than six different ways for you to get going with Azure for your cloud computing scenarios. If I find more I'll update this article. After reading this you'll have a good idea of ways to get going on Azure and how to proceed.

    PAY-AS-YOU-GO

    Azure Pay-As-You-Go is the base Azure offer. Pay for what you use on a monthly basis. Enter a credit card and away you go. You can also get pre-approved for invoicing if you're an Enterprise Account. No limitations. More information at http://azure.microsoft.com/en-us/offers/ms-azr-0003p/ .  Note you can add Azure Pay-As-You-Go to an existing account by heading to the Azure Account Management Center at https://account.windowsazure.com/Home/Index .


    ENTERPRISE AGREEMENTS

    Work for a large corporation? Have they purchased some blocks of Azure for use? Talk to your software folks and find out if you can use Azure via your coporation's Enterprise Subscription. What is an Enterprise Subscription? If you're a big corporation using large amounts of cloud computing, you're most likely not going to use a credit card to pay for your consumption. Customers may purchase Azure through Enteprirse Agreements. Customers add Azure upfront to their EA and the spend is consumed over the year. A sepecial Enterprise Portal for managing user an allocating resources to employees is provided. No limits on usage. Must be purchased from a Microsoft Account Rep or Reseller. More information at http://azure.microsoft.com/en-us/pricing/enterprise-agreement/ .  Information on purchasing from a Microsoft Reseller can be found here - http://azure.microsoft.com/en-us/pricing/purchase-options/ .

    30 DAY AZURE PASS TRIAL

    Want to play and explore with Azure but don't want a committment? Try a 30 day Azure Trial subscription. Thirty days or $200 worth of Azure to use, whatever comes first.  Account is by default capped so you cannot accidentally spend over your $200 allocation.  To sign up a free trial go to https://azure.microsoft.com/en-us/pricing/free-trial/  .

    MSDN SUBSCRIPTION

    Do you have an MSDN subscription? Did you know you have up to $150/month Azure credit you can use? Head over to the "My Account" tab on your MSDN subscription and activate your Microsoft Azure benefit. The next time you go to the Azure Portal you should see up to a $150/month credit available. Details on the offer are here - http://azure.microsoft.com/en-us/pricing/member-offers/msdn-benefits/ . MSDN subscribers can also get up to a 40% discount on pay-as-you-go-rates ( http://azure.microsoft.com/en-us/offers/ms-azr-0023p/ ).

    BIZSPARK

    Software based tech startup? Less than 5 years old? Privately held? Earning less than $1m annually? You're eligible for Microsoft Bizspark, our program for startups. Essentially Bizspark gets you the MSDN Subscription for up to five of your developers gratis for three years. With this you get up to five subscriptions for Visual Studio Ultimate + MSDN. This amounts to $150/month per developer. You get a number of other benefits such as operational software licenses and more. Qualify? Apply at https://www.microsoft.com/bizspark/ .

    DREAMSPARK FOR STUDENTS

    If you're a student, we have a special setup for you. You can get DreamSpark, which gives you access to range of software benefits. The Azure Dreamspark benefit for students gets you up to ten Azure Web Apps ( formerly Web Sites ) without requiring a credit card.  Web Apps support html, js, node, php, phython and more.  This is a great way for students to have hosted projects off their local box to showcase.

    GIVE IT A GO

    There are many different ways to get going, suitable to a number of different scenarios. Give Azure a try. Love to hear how it goes. 

    RESOURCES

    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)

    Welcome to the new devfish.net

    This isn't much yet but think of it as an iterative cycle.  Right now I'm setting up themes and configuring and doing goodies like that.  We are setup to run this at http://betablog.devfish.net until we're done, then we'll run it as full http://www.devfish.net .

    This should be a fun run, and I'm looking forward to pushing out some goodies for ya'll. 

    Note since this isn't my MSDN blog, you'll see more 'personal' and 'off-microsoft' topics flying in here. 

    Hope you enjoy!