Android 11 reports an error during OTA package:
ExternalError: Failed to run signapk.jar: return code 1:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/signapk/SignApk has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
According to the error analysis, it is caused by the jdk version.
1. First check the jdk version: java –version My previous version was openjdk-8
2. Use sudo apt-get install openjdk-11-jdk to install openjdk-11
3. Configure linux default jdk version: sudo update-alternatives –config java, select the JDK version you need
4. Configure the default java version: sudo update-alternatives –config javac, select the java version you need.
Just do the ota package again.
Read More:
- [Solved] Error: A JNI error has occurred, please check your installation and try again Exception in thread
- [Solved] ZK Connect Error: A JNI error has occurred, please check your installation and try again
- [Solved] JAVA Error: Error:A JNI error has occurred,please check your installation and try again
- [Solved] Eclipse Error: A JNI error has occurred, please check your installation and try again
- [Solved] Error: A JNI error has occurred, please check your installation and try again
- [Solved] Linux java -jar Start Project Error: Unsupported major.minor version 52.0
- How to Solve JAR pack error: Error resolving template [/userInfo], template might not exist or might not be accessib
- [Solved] javajdk1.8 Run javaFx Error: Error:Error: A fatal exception has occurred. Unrecognized option: –module-path
- How to Solve JAVA Error: error: A JNI error has occureed
- [Solved] Android project Compile error: error processing kotlin-stdlib-1.6.0.jar
- Failed to scan osdt_cert.jar & osdt_core.jar [How to Solve]
- JNI ERROR (2354): JNI connection is NULL [How to Solve]
- [Solved] jar Run Error: no main manifest attribute
- Spring boot uses thread pool to realize asynchronous processing without return and asynchronous processing with return
- Tomcat Run Error: Can‘t find catalina.jar [How to Solve]
- How to Solve classnotfoundexception error in spark without Hadoop runtime
- [Solved] SpringBoot Pack Project: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources
- Eclipse Error: Could not create the Java Virtual Machine Error:A fatal exception has occurred
- [Solved] spring source code compile error: target package does not exist