How to use JRE/JDK v8 with Android Studio v2

I was struggling with a rendering exception in Android Studio v2
Failed to load the LayoutLib: com/android/layoutlib/bridge/Bridge : Unsupported major.minor version 52.0

Apparently this can be fixed by telling Android Studio to use JRE v8 (for the IDE, not compiling).
One could edit the plist to tell Android Studio to use a different JRE than the default v6, but that’s not recommended by Google.

So here’s a workaround; create a shortcut/alias that exports a value to use JRE v8.

Save this to a .command file, for example LaunchAndroidStudio.command:
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk
open /Applications/Android\

Change the icon for the alias.
Open the contents of /Applications/Android
Navigate to /Contents/Resources and double click the AndroidStudio.icns, it will open in Preview
Copy the icon (Command+C)
Open the LaunchAndroidStudio.command by the “Get Info” command.
Click the default icon in the top left corner and past the icon (Command+V)


How to post to a Microsoft Azure Service Bus using Intel Galileo

In my previous post, I walked you through on how to Install Python Azure SDK on Intel Galileo.

Let’s now put that Python SDK into some work and post something to an Azure Service Bus Queue.

It’s really rather straight forward:

The only thing is to Base64 encode your string to be compatible with the other Azure SDK’s, in case you want compatibility with WIndows/Android/iOS etc.

But before we run this, you would need to set the on board clock on the Intel Galilelo, otherwise you will get this error:

So, they easiest way is to synchronise the clock against a time server:

You will need to do this every time after you have shut down the board, since the clock is not battery backed up. So it might be a good idea to put this in a script and have it run at startup.

There you have it.




Install Python Azure SDK on Intel Galileo

This  post walks you through the steps to install Python Azure SDK on Intel Galileo.



  • An Intel Galileo board (Gen 1 or 2)
  • The full Linux boot image
  • Internet connection (either using the built in Ethernet port or using a mini-PCIe WiFi board)
  • CURL with SSL/TLS support

Step 1 Get the big Linux image

You will need to boot in to the full Linux image, which you can download from Intel’s  download page.

Step 2 Boot into Linux

Extract the contents of that compressed file onto a SD card and boot the Galileo from it.

Step 3 Install prerequisites

SSH into your Galileo board as root (no password by default)

Make sure the latest CURL and OpenSSL are installed


The Linux image I was using at the time of this writing did not have any Root CA certificates installed. Sure, one could bypass certificate validation using Curl’s -k option, but that’s cheating.

First, create the default certificate directories:

Download the latest CA certificates

(Yes yes, I know about -k, but this is a catch 22 moment, we need to get the certs down  from an SSL/TLS connection in the first place)

Step 4 Download and install PIP

Download and install the Python PIP


 Step 5 Install the Python Azure SDK



 Step 6 Verify

Now we can verify that Python can access the Azure SDK



There you have it. So, what cool things can we do with Microsoft Azure and an Intel Galileo? Let me know in the comments below.