Forum Xamarin.Android

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to fix UnsupportedClassVersionError which I am getting while creating the signed apk

I am trying to generate a signed apk for my xamarin android project by using Visual studio for mac.

Error

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: 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

System details

Xamarin.Profiler
Version: 1.6.12.29
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode 11.2.1 (15526.1)
Build 11B500

Xamarin.Mac
Version: 6.6.0.12 (Visual Studio Community)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:07-0400

Xamarin.iOS
Version: 13.6.0.12 (Visual Studio Community)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:08-0400
Xamarin.Android
Version: 10.0.6.2 (Visual Studio Community)
Commit: xamarin-android/d16-3/c407838
Android SDK: /Users/admin/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
5.1 (API level 22)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.1
SDK Build Tools Version: 30.0.0 rc4

Build Information:
Mono: mono/mono/[email protected]
Java.Interop: xamarin/java.interop/[email protected]
LibZipSharp: grendello/LibZipSharp/[email protected]
LibZip: nih-at/libzip/[email protected]
ProGuard: xamarin/proguard/[email protected]
SQLite: xamarin/sqlite/[email protected]
Xamarin.Android Tools: xamarin/xamarin-android-tools/[email protected]

Microsoft Mobile OpenJDK
Java SDK: /Users/admin/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 1.4.0.65
Hash: c33b107
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:22 UTC

What changes I have to done to fix this issue in my mac .

Best Answers

  • jezhjezh Member, Xamarin Team Xamurai
    Accepted Answer

    Will your application successfully compile and run on your device before creating the signed apk?

Answers

  • jezhjezh Member, Xamarin Team Xamurai
    Accepted Answer

    Will your application successfully compile and run on your device before creating the signed apk?

  • XamarinInfoXamarinInfo Member ✭✭

    Ya, it's working perfectly..

  • XamarinInfoXamarinInfo Member ✭✭

    It doesn't have any issue in debugging and release mode,but facing issue while generating signed apk from the archived file

  • jezhjezh Member, Xamarin Team Xamurai

    Have you tried any other apps in your computer?

    Besides, could you please post the full log of this question?

  • XamarinInfoXamarinInfo Member ✭✭

    @BrendanZagaeski said:

    SDK Build Tools Version: 30.0.0 rc4

    This is an issue with Android SDK Build-Tools 30. The recommended way to resolve the error in the current Visual Studio versions is to remove any versions of Android SDK Build-Tools 30 that are installed, for example by removing any 30.0.0* directories from the build-tools subdirectory under the Android SDK installation path.

    See also: https://developercommunity.visualstudio.com/content/problem/1086793/index.html

    Thankyou bro..

Sign In or Register to comment.