You are not logged in.

#1 2016-12-03 09:45:15

qwertypoke
Member
Registered: 2011-09-06
Posts: 28

[SOLVED] Android Studio and required JDK versions? JDK7? JDK8

I am using Android Studio to build something for Android Lollilpop and Marshmallow.

The documentation says:
https://wiki.archlinux.org/index.php/an … opment_Kit

Java Development Kit
For Android 7 (Nougat), OpenJDK 8 is required, which is available with the jdk8-openjdk package.
For Android 5 and 6 (Lollipop and Marshmallow), OpenJDK 7 is required, which is available with the jdk7-openjdk package.

Does the above mean that I have to have exactly OpenJDK 7 or at least version 7? In other words, what should I install to satisfy dependencies for Android Studio and also for other packages of a typical Arch Linux installation?

OpenJDK7 only?
OpenJDK8 only?
OpenJDK7 and OpenJDK8? If so, should the Java Environment be set to OpenJDK7 or OpenJDK8

Thanks!

Last edited by qwertypoke (2016-12-05 12:23:16)

Offline

#2 2016-12-03 12:38:38

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Android Studio and required JDK versions? JDK7? JDK8

It works fine with openjdk8 (as fine as android studio can work....., hope you have lots of ram). If you need to develop for ancient insecure versions of android then you have to use java7 to build though, but can still run android studio itself under openjdk8. Just set the compiler/runtime paths in AS correctly. So install both openjdk 7 and 8.

Last edited by Mr.Elendig (2016-12-03 12:43:02)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2016-12-04 20:41:39

qwertypoke
Member
Registered: 2011-09-06
Posts: 28

Re: [SOLVED] Android Studio and required JDK versions? JDK7? JDK8

Thank you for your help.

I installed only OpenJDK8 to see how far I get without other JDKs. It turned out that for my project JDK8 was enough.

If somebody stumbles on this topic, I have some possibly relevant information about my setup that might interest other Android Studio newbies:

I made a small Android app targeted for Kitkat and above using Android Studio 2.2.2.

I let Android Studio install everything (platform tools etc.) it recommended installing or updating.

I set the API level as follows in MyApp->App->build.gradle:
See http://stackoverflow.com/questions/1946 … oid-studio

...
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.tuomasjantti.yle2chromecastaudio"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
...

I did my debugging using an android 5.1.1.-phone.
I generated a signed APK. I installed this on a 4.4.2, 5.1.1 and a 6.0 -phone.
The application installs and works on all these phones.

And yes Android Studio is rather thirsty on ram: The task manager shows over 1 GB memory usage for Android Studio and Java processes during compilation.

Offline

#4 2016-12-05 11:53:12

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Android Studio and required JDK versions? JDK7? JDK8

1GiB is nothing, usually it eats >4


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2016-12-05 12:22:29

qwertypoke
Member
Registered: 2011-09-06
Posts: 28

Re: [SOLVED] Android Studio and required JDK versions? JDK7? JDK8

That does not sound very promising with 3,6 GB installed that I use partly for /tmp to spare the ssd-drive. Currently my app is small and does very little.

Anyway I marked the question as solved.

Offline

Board footer

Powered by FluxBB