JDK 7 Support in the Android SDK?

8,524 views
Skip to first unread message

Mark Murphy

unread,
May 26, 2013, 1:22:30 AM5/26/13
to adt...@googlegroups.com
I am still catching up with the Google I|O conference videos. I just
watched the Android Fireside Chat one. The question came up regarding
JDK 7 support, and, if I understood correctly, Xav indicated that such
support already existed, as of R21 (or R21.0.2 or something like that
-- tough to hear that bit when watching the video on a plane...).

Did I understand that correctly?

If yes, are there any SDK/ADT-specific instructions for getting this
to work? Or should it work "out of the box", assuming that JDK7 itself
is properly configured on the development machine and within Eclipse?

Is this something you want people using? I ask because the SDK
requirements list still cites JDK 6. I know that there have been
unofficial ways of getting JDK 7 to work for a bit now, but I've been
waiting on advising people to consider it until it was officially
blessed by The Powers That Be on the tools team.

Thanks!

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.8 Available!

Jonathan Steele

unread,
May 26, 2013, 1:54:22 AM5/26/13
to adt...@googlegroups.com
Fascinating post. I couldn't hear much on that video over poor laptop speakers.

https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/java/lang/AutoCloseable.java, this file used to have @hide

Joe Bowbeer

unread,
May 26, 2013, 11:53:59 AM5/26/13
to adt...@googlegroups.com
I've been using JDK7 to build Android apps via Ant and Eclipse since April of last year:

https://code.google.com/p/android/issues/detail?id=19567#c23

The last hitch was signing release builds, which required an enhancement in Ant 1.8.3 and a corresponding change in Android tools that was released last July.

Xavier Ducrohet

unread,
May 26, 2013, 2:33:20 PM5/26/13
to adt...@googlegroups.com
I think we still say 6 as a minimum, but yes you can use 7. Signing issues have been fixed, and I think that was the last thing that really remained. as Joe said below we actually fixed this last year for Ant which was still using Jarsigner (JDK7 changed the default signing algorithm so this broke signing from Ant).

With 22 we moved away from Jarsigner anyway.



--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Mark Murphy

unread,
May 27, 2013, 5:25:14 AM5/27/13
to adt...@googlegroups.com
On Sun, May 26, 2013 at 2:33 PM, Xavier Ducrohet <x...@android.com> wrote:
> I think we still say 6 as a minimum, but yes you can use 7.

OK, I'll get on that.
Localized Android Question-and-Answer Sites: http://www.andglobe.com

Giuseppe

unread,
May 27, 2013, 6:49:44 AM5/27/13
to adt...@googlegroups.com
When try to use the 1.7 with ADT 22 still get : Description Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties

Xavier Ducrohet

unread,
May 28, 2013, 2:05:21 PM5/28/13
to adt...@googlegroups.com
That is normal. while you can use JDK 7 to run your host Java tools, you still need to compile for Java6. There has been no changes on the Android platform side.


On Mon, May 27, 2013 at 3:49 AM, Giuseppe <porcelli...@gmail.com> wrote:
When try to use the 1.7 with ADT 22 still get : Description Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Giuseppe Porcelli

unread,
May 28, 2013, 2:12:21 PM5/28/13
to adt...@googlegroups.com

Thank you very much.

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/Bq9GO4edMpQ/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Yuku Sugianto

unread,
May 30, 2013, 1:39:32 PM5/30/13
to adt-dev

But I wonder, how, then, IntelliJ 12 can run Android projects with the project's language level set to 7?

Best regards,
Yuku

Reply all
Reply to author
Forward
0 new messages