title: Maven Android: java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
body: <p>When I try building my android project with the following:</p>
  
  <p><strong>Maven</strong>: apache-maven-3.3.9,</p>
  
  <p><strong>JDK</strong>: jdk1.7.0_79</p>
  
  <p>I get the following error:</p>
  
  <pre><code>java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
  </code></pre>
  
  <p>Can anyone please help?</p>
  
  <p>Thank you.</p>
  
  <p>My pom is as follows:</p>
  
  <pre><code>    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.concretepage&lt;/groupId&gt;
      &lt;artifactId&gt;AndroidDemo&lt;/artifactId&gt;
      &lt;version&gt;1&lt;/version&gt;
      &lt;packaging&gt;apk&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.android&lt;/groupId&gt;
              &lt;artifactId&gt;android&lt;/artifactId&gt;
              &lt;version&gt;4.1.1.4&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.android&lt;/groupId&gt;
              &lt;artifactId&gt;spring-android-rest-template&lt;/artifactId&gt;
              &lt;version&gt;1.0.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.simpleframework&lt;/groupId&gt;
              &lt;artifactId&gt;simple-xml&lt;/artifactId&gt;
              &lt;version&gt;2.7.1&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;artifactId&gt;stax&lt;/artifactId&gt;
                      &lt;groupId&gt;stax&lt;/groupId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;artifactId&gt;stax-api&lt;/artifactId&gt;
                      &lt;groupId&gt;stax&lt;/groupId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;artifactId&gt;xpp3&lt;/artifactId&gt;
                      &lt;groupId&gt;xpp3&lt;/groupId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;artifactId&gt;xmlParserAPIs&lt;/artifactId&gt;
                      &lt;groupId&gt;xerces&lt;/groupId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;    
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;            
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.6.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
                &lt;plugin&gt;
                  &lt;groupId&gt;com.simpligility.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;4.4.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;sdk&gt;
                          &lt;platform&gt;23&lt;/platform&gt;
                      &lt;/sdk&gt;
                      &lt;deleteConflictingFiles&gt;true&lt;/deleteConflictingFiles&gt;
                      &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt;
                      &lt;resourceDirectory&gt;${basedir}/res&lt;/resourceDirectory&gt;
                      &lt;androidManifestFile&gt;${basedir}/AndroidManifest.xml&lt;/androidManifestFile&gt;
                  &lt;/configuration&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
                &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Project structure as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/KbafU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KbafU.png" alt="enter image description here"></a></p>