简体   繁体   中英

Jenkins Android Library - Unsupported major.minor version 51.0

I'm brand new to Jenkins and I'm trying to compile an Android Library that is a Maven project. However, I keep getting an Unsupported major.minor version 51.0. I have read a few answers that say that changed the JRE will fix this, but we are developing in an Eclipse environment, and changing the compiler in Eclipse does not change it in Jenkins.

Any help on how to solve this in Jenkins will be much appreciated.

The error:

java.io.IOException: Remote call on Channel to Maven [java, -cp, /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.0.5/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.0.5/conf/logging, jenkins.maven3.agent.Maven31Main, /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/apache-maven-3.0.5, /var/cache/jenkins/war/WEB-INF/lib/remoting-2.48.jar, /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar, /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar, 41982] failed  



Caused by: java.lang.UnsupportedClassVersionError: org/apache/maven/eventspy/EventSpy : Unsupported major.minor version 51.0

Had the same issue while switching from java 7 to 8, this is what we did:

1) Access Jenkins home(from browser) ip:port#
2) Click on "Manage Jenkins"
3) Click on "Configure system"
4) Under the JDK section, install the correct version (version that the code is compiled, in your case, same version as Eclipse). And set it to default.

gl!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM