Android Studio: ‘openjdk shows intermittent performance and ui issues.’

Hi all, I know it’s been a while, it’s been a busy couple of months!

I’ve started extra classes on telecommunication and I’ve been busy learning myself some more Android Development during the time that has passed since last post.

Since Linux is still a slumbering interest of mine, I’ve decided to polish up my Linux skills by creating a new Ubuntu VM hosted in Oracle VirtualBox and trying out some Android Development there.

However before I got everying to work, I ran into some difficulties, one of which being the following error popping up after starting Android Studio:

openjdk shows intermittent performance and ui issues"

After some research, I learned that this was because of the default Java version installed on my system was indeed “OpenJDK” and not the Latest Oracle JDK as recommended.

Not much later, luckily I also found a fix, following some of the steps of the guide here:

I had to do the following.

1. Download the latest Oracle Java SE Development Kit for the official Oracle site  (8u25 for Linux 64 bit in my case)

2. Unzip the package using tar

tar xzvf ~/Downloads/jdk-8u25-linux-x64.tar.gz

3. Move the folder you’ve just unzipped to /usr/lib/jvm/

sudo mv jdk1.8.0_25/ /usr/lib/jvm/

4. install the new JDK to your system

Do this by executing the following commands:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_25/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_25/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8.0_25/bin/javaws 1

5. Configure the standard java version for your system

Execute the following commands and choose the new Oracle JDK you’ve just installed

sudo update-alternatives --config java
sudo update-alternatives --config javaws

And that’s it, you’re done!

To confirm the changes you’ve just made, execute

java -version

and you should see something like this appearing in your terminal:

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Hopefully this fixed the issue for you, and I wich you good luck programming you’re first apps!

If you liked this post, feel free to leave a comment or follow me on Twitter @RW_Spaf or Google+!


Tagged with: , , , , , ,
Posted in Android, Development, Linux, Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: