First dabbles with Android-Studio

A while back I was dabbling with App-Inventor to get my hexy the hexapod working on my Nexus tablet.  It was a fun project.   Poor hexy is in pieces now, stripped for her servo’s.    So.. for a variety of reasons, I sort of have an itch for looking at android programming again.

Doing a fair amount of googling, It looks like the thing to try is Android- Studio…  Ok.
So I ran across setting up a android-studio on ubuntu via a PPA here:
http://www.webupd8.org/2014/05/install-android-studio-in-ubuntu-via-ppa.html?m=1

It took me a few minutes to figure out how to fire the darn thing up.

jonasthomas@JTLapTop:~$ /opt/android-studio/bin/studio.sh

So you think I be ready to fly….. nope.

JDK Required: ‘tools.jar’ seems to be not in Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.

Ok…  So an interesting post on here
JDK = JRE + Development tools.

JRE = JVM + Libraries

JDK = {JVM + Libraries} + Development tools.

On the Tools.Jar I found a nice post here: http://stackoverflow.com/questions/17474963/android-studio-tools-jar-file-is-not-present-in-classpath

Hmm
jonasthomas@JTLapTop:~$ java -version
java version “1.7.0_79”
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
jonasthomas@JTLapTop:~$ java -version
java version “1.7.0_79”
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
jonasthomas@JTLapTop:~$

Ok.. I have OpenJDK installed (Possibly when I installed Eclipse-Arduino)  This seems to be working ok.. So I don’t want to hose that up.
Soo.. The previous post pointed me to here:http://arwankhoiruddin.blogspot.co.il/2014/01/android-studio-in-ubuntu-problem.html

jonasthomas@JTLapTop:~$ update-alternatives –config java
There are 3 choices for the alternative java (providing /usr/bin/java).

Selection    Path                                            Priority   Status
————————————————————
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
1            /usr/bin/gij-4.8                                 1048      manual mode
2            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
3            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode

Press enter to keep the current choice[*], or type selection number:

Ok.. I think all I need to do is to a Path to studio.sh

Soo.. I added this to the top:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

Well that didn’t work.
Some talked about just doing this.
http://stackoverflow.com/questions/17033726/android-studio-error-after-studio-sh

sudo apt-get install openjdk-7-jdk

Ok… So that did it…
Its a bit strange that seems to have worked.  I thought that I had the jdk already installed, but when I did the installed it didn’t give me a message back that it was installed already and libraries started loading up.. Go figure.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *