Skip to content

LinkageError occurred while loading main class com.xamarin.manifest java.lang.UnsupportedClassVersionError #10132

Closed

Description

@viniciusjarina

Android framework version

net10.0-android (Preview)

Affected platform version

10.0.100-preview.3.25201.16

Description

Try to build Android hello world application with .NET preview3 fails to build.

Steps to Reproduce

dotnet new android
dotnet build


    MANIFESTMERGER : error : LinkageError occurred while loading main class com.xamarin.manifestmerger.Main
    MSBUILD : java error AMM0000: 
      Error: LinkageError occurred while loading main class com.xamarin.manifest
      merger.Main
      java.lang.UnsupportedClassVersionError
       com/xamarin/manifestmerger/Main has been compiled by a more recent versio
      n of the Java Runtime (class file version 61.0), this version of the Java 
      Runtime only recognizes class file versions up to 55.0
      
    /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/35.99.0-preview.1.140/tools/Xamarin.Android.Common.targets(1561,3): error XAAMM0000: 
      Error: LinkageError occurred while loading main class com.xamarin.manifest
      merger.Main
      	java.lang.UnsupportedClassVersionError: com/xamarin/manifestmerger/Main h
      as been compiled by a more recent version of the Java Runtime (class file 
      version 61.0), this version of the Java Runtime only recognizes class file
       versions up to 55.0

Did you find any workaround?

Use .NET 9

Relevant log output

MANIFESTMERGER : error : LinkageError occurred while loading main class com.xamarin.manifestmerger.Main
    MSBUILD : java error AMM0000: 
      Error: LinkageError occurred while loading main class com.xamarin.manifest
      merger.Main
      java.lang.UnsupportedClassVersionError
       com/xamarin/manifestmerger/Main has been compiled by a more recent versio
      n of the Java Runtime (class file version 61.0), this version of the Java 
      Runtime only recognizes class file versions up to 55.0
      
    /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/35.99.0-preview.1.140/tools/Xamarin.Android.Common.targets(1561,3): error XAAMM0000: 
      Error: LinkageError occurred while loading main class com.xamarin.manifest
      merger.Main
      	java.lang.UnsupportedClassVersionError: com/xamarin/manifestmerger/Main h
      as been compiled by a more recent version of the Java Runtime (class file 
      version 61.0), this version of the Java Runtime only recognizes class file
       versions up to 55.0

Activity

  1. added
    Area: App+Library Build
    needs-triage
    on May 12, 2025
  2. jonathanpeppers commented on May 12, 2025

    @jonathanpeppers
    Member

    This error message is saying you need to use JDK 11:

    Runtime only recognizes class file versions up to 55.0
    

    But I think we've required JDK 11 even in .NET 8 (let alone .NET 10).

    To get on the recommended JDK, if you install JDK 17, does the problem go away?

  3. added
    need-info
    and removed
    needs-triage
    on May 12, 2025
  4. dotnet-policy-service commented on May 12, 2025

    @dotnet-policy-service

    Hi @@viniciusjarina. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

  5. viniciusjarina commented on May 12, 2025

    @viniciusjarina
    Author

    @jonathanpeppers indeed Installing JDK 17 fix the problem. Thank you 🥳

  6. locked and limited conversation to collaborators on Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: App+Library Buildneed-info

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions