Bug 46184 - When building with JDK7, UnsupportedClassVersionError for version 52.0 shown
Summary: When building with JDK7, UnsupportedClassVersionError for version 52.0 shown
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: Low normal
Target Milestone: 4.3.0 (C9)
Assignee: Juan Marcelo Tondato
Depends on:
Reported: 2016-10-31 12:06 UTC by Daniel Cazzulino
Modified: 2017-02-01 16:53 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Daniel Cazzulino 2016-10-31 12:06:30 UTC
Under the same setup for bug #46183 (https://bugzilla.xamarin.com/show_bug.cgi?id=46183), 
the following build error shows up:

> Error java.lang.UnsupportedClassVersionError: com/android/dx/command/Main  :  Unsupported major.minor version 52.0    App1.Droid

The error is solved by installing JDK8, but Android Studio 2.2.2 doesn't seem to require that, so we need to investigate why we do? Specially since the VS setup installs JDK7 instead, resulting in a broken setup right from the start :(
Comment 1 narayanp 2017-02-01 16:53:28 UTC
I have checked this issue with latest cycle 9 Xamarin and observed that now a proper message is shown in the 'Error List' that your app can not build using Android 7.0(API Level 24 - Nougat i.e., default installed with Android Studio 2.2.2 Stable) because your Java version (1.7.0) is too old. 
You must have at least 1.8 installed.

Screencast: https://www.screencast.com/t/LJro9kpSU346