Categories
Android Android Studio Java linux Programming

Android Studio Under Debian – The Return

So, in trying to actually run Android Studio on a new machine, I’ve had to add a few more dependencies. You can see the original post here: Android Studio Under Debian. Now I am running Debian Testing, and came up against some more interesting missing dependencies after that when creating a new project. So if you get an error like so:

> /home/tbsliver/<snip>/app/src/main/res/drawable-xxhdpi/ic_launcher.png: Error: Cannot run program “/home/tbsliver/Development/android-studio/sdk/build-tools/20.0.0/aapt”: error=2, No such file or directory

Then you need to install a few extra packages. Elsewhere on the internet it will tell you to install ‘ia32-libs’, however these have been replaced with two other packages. So install them as so:

sudo apt-get install lib32z1 lib32ncurses5

And then you will also need one final package which you will get errors about otherwise:

sudo apt-get install lib32stdc++6

After that, it should work and run the Gradle commands nicely! hope this helps someone! (or just reminds me what the issues are later)

Categories
Android Android Studio IDE's Java linux Programming

Android Studio under Debian

Hey long term readers! Just another short entry so that things I find useful to know are actually accessible to other people if they so need it. Today: Getting Android Studio to work in Debian (Wheezy).

So when I first ‘installed’ (read: unzipped) Android Studio, it wouldn’t start up – something about a .jar file missing:

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

Which, as any programmer who encounters an odd error does, was promptly pasted into Google to see what other people had done about this. And really, there wasn’t a huge amount of things on it specifically, a lot of posts about needing to install the full Sun/Oracle JDK. Now, as I’m running Debian, that would mean changing the entire Java kit out from the OpenJDK that is currently installed… so I wondered – couldn’t I just install the OpenJDK Dev Kit? lo-and-behold, one simple aptitude install later and its all working – apart from an upgrade to Android Studio straight away… So, to get this working easily, and without any faffing about re-installing the entirety of Java, you just need to do this:

sudo aptitude install openjdk-6-jdk

Wait for it to finish, then re-try running Android Studio!

NB: I did find that the first time I ran it, the first menu screen didn’t render properly, but I think that may just have been a bug that was fixed in the update to Android Studio.