i built my first app in Xamarin (in Visual Studio 2019) and I want to deploy it to my android phone. (I actually dont really want to make the app public - just my phone would do the trick for now. I just dont want to root it.)
I followed these guides:
But once the archiving process is finished, and I was asked for the password of the 'Signing Identity' I defined before, I get the following error:
Signing packages failed. java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of Java Runtime(class file version 53.0), this version of the Java Runtime only recognizes class file versions of up to 52.0
I tried to install all sorts of Java versions (currently I am at 'Java 8 Update 241' and 'JDK 13.0.2') and made sure there is just one Java entry in my PATH variable pointing to the current version.
But it just wont change anything and I am out of Ideas, I hope somebody here can help me.
Thank you very much for your time in advance! Ben
I faced the same problem. I solved it removing version 30.0.0 (rc2) of android build tools and keep only version 28.0.3. Probably it was a problem with build tools 30 and the latest version of Xamarin, who uses JDK 1.8. I also updated platform tools to version 29.0.6
Double-check that Java JDK 13.0.2 is selected in the Xamarin preferences:
Visual Studio: Tools > Options > Xamarin > Android Settings > Java Development Kit Location.
Here is a similar thread. You can refer to it.
https://stackoverflow.com/a/36585636/10627299
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With