java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Bug #1821235 reported by Andreas Schildbach
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
android-platform-tools-apksig (Debian)
Fix Released
Unknown
android-platform-tools-apksig (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned

Bug Description

Here is another regression from the new packages in Bionic proposed-updates:

$ apksigner
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 55.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:763)
 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:424)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

I'm using OpenJDK 8 here.

This will be affecting the publishing of Android apps. ApkSigner is the tool you use for signing the Application Archives.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apksigner 0.8-2~18.04
ProcVersionSignature: Ubuntu 4.18.0-17.18~18.04.1-generic 4.18.20
Uname: Linux 4.18.0-17-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Mar 21 20:00:32 2019
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-04-21 (1063 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
SourcePackage: android-platform-tools-apksig
UpgradeStatus: Upgraded to bionic on 2018-04-26 (328 days ago)

Revision history for this message
Andreas Schildbach (schildbach) wrote :
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. I have uploaded a package into disco-proposed with the fix. Meanwhile the uploads to bionic-proposed and cosmic-proposed are waiting for approval, a bot will add a notice when they get approved.

Since it is late and approval requires manual intervention by an admin we might only get someone to look this over on Monday.

Changed in android-platform-tools-apksig (Debian):
status: Unknown → New
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted android-platform-tools-apksig into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/android-platform-tools-apksig/0.8-2ubuntu1~18.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in android-platform-tools-apksig (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in android-platform-tools-apksig (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed-cosmic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Andreas, or anyone else affected,

Accepted android-platform-tools-apksig into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/android-platform-tools-apksig/0.8-2ubuntu1~18.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Andreas Schildbach (schildbach) wrote :

On Bionic, nothing has changed.

$ dpkg -l apksigner
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================================================================-=====================================-=====================================-======================================================================================================================================
ii apksigner 0.8-2~18.04 all command line tool to sign and verify Android APKs
$ which apksigner
/usr/bin/apksigner
$ /usr/bin/apksigner
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 55.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:763)
 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:424)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

tags: added: verification-failed-bionic
removed: verification-needed-bionic
Revision history for this message
Andreas Schildbach (schildbach) wrote :

Damn, the repository still had the old version. Now, with the new version, it works. Sorry for that.

tags: added: verification-done-bionic
removed: verification-failed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package android-platform-tools-apksig - 0.8-2ubuntu1

---------------
android-platform-tools-apksig (0.8-2ubuntu1) disco; urgency=medium

  * Compile for Java 8: (LP: #1821235)
    - debian/rules: the parameter '-target 8' must be set to get got compiled
      for OpenJDK 8, setting '--release 8' is the best way as it guarantees
      that the whole '-source/-target/-bootclasspath' triad is correctly set.

 -- Tiago Stürmer Daitx <email address hidden> Fri, 22 Mar 2019 21:15:35 +0000

Changed in android-platform-tools-apksig (Ubuntu):
status: New → Fix Released
Revision history for this message
Andreas Schildbach (schildbach) wrote :

Works on Cosmic, too. Thanks!

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Changed in android-platform-tools-apksig (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package android-platform-tools-apksig - 0.8-2ubuntu1~18.04

---------------
android-platform-tools-apksig (0.8-2ubuntu1~18.04) bionic; urgency=medium

  * Backport for OpenJDK 11. LP: #1819448.

android-platform-tools-apksig (0.8-2ubuntu1) disco; urgency=medium

  * Compile for Java 8: (LP: #1821235)
    - debian/rules: the parameter '-target 8' must be set to get got compiled
      for OpenJDK 8, setting '--release 8' is the best way as it guarantees
      that the whole '-source/-target/-bootclasspath' triad is correctly set.

android-platform-tools-apksig (0.8-2) unstable; urgency=medium

  [ Emmanuel Bourg ]
  * Removed the alternative build dependency on openjdk-8-jdk

  [ Kai-Chung Yan ]
  * Install Maven artifacts of `apksig.jar`
  * Standards-Version => 4.2.1
  * uscan: Watch for `gradle-*` tags instead of `android-*_r*`
  * Instal Maven artifacts for `apkgsig.jar`
  * Remove unused build-dependencies: antlr3 groovy maven-debian-helper
  * apksigner now requires JRE >= 8 since it is compiled on source level 8
  * Add myself to Uploaders
  * Install `apksigner` into Android SDK home

  [ Hans-Christoph Steiner ]
  * Use real URLs for Vcs-Git, not ones that redirect
  * Add autopkgtest for APK verification
  * Add GitLab CI support

 -- Tiago Stürmer Daitx <email address hidden> Sat, 23 Mar 2019 00:19:26 +0000

Changed in android-platform-tools-apksig (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in android-platform-tools-apksig (Ubuntu Cosmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.