daniel
daniel

Reputation: 697

Can I use jdk 7 for android with 1.6 compiler?

I have both JDK7_u40 and JDK6_u45 installed in my computer, with windows 7, I am currently working with LibGDX to make a simple game for desktop and Android,

I would like to know, can set compiler in jdk7 to 1.6 and use it in android without problem or I should set environment variable to jdk6 to use for android. I am using ADT bundle.

Thanks for answers.

Upvotes: 0

Views: 1415

Answers (3)

android developer
android developer

Reputation: 116402

staring with the ADT (22.6 ) and if your app has a minSdk of at least 19 (kitkat) , it should be possible to safely use java 1.7 functionalities :

http://tools.android.com/recent/eclipseadt226preview

Upvotes: 1

Jon
Jon

Reputation: 1388

Both Eclipse and Android Studio should default to 1.6 when you create a new android project, so you shouldn't need to do anything to get it working with JDK 7.

If for some reason it gives you issues you can change the Source and Bytecode versions by going to "Project Properties" -> "Java Compiler"

Upvotes: 0

android developer
android developer

Reputation: 116402

rumors say only inteliJ supports java 1.7 (and maybe even java 1.8) coding for android, but i've never tested it.

the rest of the IDEs (that I know of) don't.

Upvotes: 1

Related Questions