Magno 4 Posted August 4, 2024 (edited) Hello! I have installed D12 Community version, after struggling with Android SDK, at the end now I have installed both 33 and 34. I also have D11 installed but as nothing was working before I remove the SDK from D11 as my intention is move to D12. With that said, after installed everything I opened a sample to give a test and something is off. I have downloaded the JDK 21 (Eclipse Adoptium [C:\Program Files\Eclipse Adoptium\jdk-21.0.4.7-hotspot] but anyways: java.lang.UnsupportedClassVersionError: com/embarcadero/dexer/Main has 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 52.0 I can understand that my java runtime is using an older version and to add more confusion I also will have a version 17 on C:\Program Files\Microsoft\jdk-17.0.12.7-hotspot plus a JDK for C:\Program Files\Java... Now, how can I fix that? Of course I would like to have only one version of the SDK. SOLVED: I uninstalled every Java JDK installation and had sure to have only one, fixed some system environment variables, reconfigured the SDK path and done Edited August 5, 2024 by Magno Share this post Link to post
Rick Howitt 1 Posted 7 hours ago To those that have installed Delphi12.3 you may come up against this same error. To fix the error down load the latest JDK. And then you will need to update the JAVA items in the SDK manager. 1 Share this post Link to post
Patrick PREMARTIN 111 Posted 7 hours ago Hi @Rick Howitt Why do you think this error will appear for Delphi 12.3 ? The supported SDK is 35. NDK, SDK and JDK are installed for that. And if you want to change things (install packages, ...) you have now the Android Manager in GetIt. The only thing to do for existing projects is to refresh Android libraries list from the contextual menu in the project manager. If you forced the SDK in the Android manifest, use the default one. Share this post Link to post
dtpfl 1 Posted 7 hours ago This error appeared since 12.3,by default it doesnt work, refreshing libraries also didnt fixed the issue! The new Android Manager also dont work @Patrick PREMARTIN The solution from @Rick Howitt worked, thank you! Share this post Link to post
DelphiUdIT 218 Posted 6 hours ago 3 minutes ago, dtpfl said: This error appeared since 12.3,by default it doesnt work, refreshing libraries also didnt fixed the issue! The new Android Manager also dont work Yes, this is tue, after updating with that tool the USB driver, it (the tool) doesn't work anymore ... same issue. But of course you can use the command line to install other sdk platforms. On 8/4/2024 at 3:23 PM, Magno said: java.lang.UnsupportedClassVersionError: com/embarcadero/dexer/Main has 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 52.0 This is because when you used something from Embarcadero (but if try to update Android platforms was the same) your Windows environment was setting for Java version less the 17. JDK, JRE,SDK or like you want to call them MUST BE version 17 or upper to managed class file version 61. In this case the error seems to say you had active Java SDK version 8. I normaly used to set this two environment "variables" and I never had problem with JAVA or Android SDK: Quote JAVA_EXE=C:\Program Files\Common Files\Oracle\Java\javapath\java.exe SKIP_JDK_VERSION_CHECK=1 Of course with the correct personal path and be sure the you have Java version upper or equal to 17 (by now, in the future will see). 2 Share this post Link to post
Patrick PREMARTIN 111 Posted 6 hours ago Good to know you find a solution. I've just installed the Android SDK manager GUI from GetIt and it worked fine. I don't have Android Studio or VS Code in my VMs. Do you have any of them or an other development tool ? Share this post Link to post
DelphiUdIT 218 Posted 6 hours ago (edited) 26 minutes ago, Patrick PREMARTIN said: I've just installed the Android SDK manager GUI from GetIt and it worked fine. I don't have Android Studio or VS Code in my VMs. Do you have any of them or an other development tool ? I work with real machine not VM, and I don't have Android Studio installed. That tool works and show me the same window, but after install the USB driver (in Extras may be) it stopped works. I use a personal path for Catalog Repo (no UTF chars) ... But it's not a real problem for me. You can do the same with other means. EDIT: UPDATE: I used the old "Android SDK Tools" and delete the USB Driver. Now the new Embacadero tool is working again ... 🙂Install again the USB driver ... the Embarcadero tool seems to still works ... (with some graphic glitch about old Anroid tools). Edited 6 hours ago by DelphiUdIT Share this post Link to post
Patrick PREMARTIN 111 Posted 5 hours ago (hope it will still work tomorrow) Share this post Link to post