Can the Android SDK work with JDK 1.7?

Yes, you can use Java 1.7 for the Android development. You must keep source compatibility with Java 6 during compile and only the next problem is because of the changed default algorithm for jarsigner.

This is solved in Stack Overflow question Android signing with Ant (workaround).

But it is already fixed in Ant. So the official support will be directly in the Android SDK soon.

If you want to use Maven for the build, the solution is in What kind of pitfals exist for the Android APK signing.

Update: Latest version of Ant, Maven Plugin or Gradle has no problem with Java 7 or Java 8, so this is already obsolete.

Leave a Comment