0

I had this error when i tried to run this AR project jyotivasu / ARCore-Android/ARCore-App-Local-3dModel/ on the android studio:

Cause: com/android/tools/idea/gradle/run/OutputBuildAction 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

I've found a similar one to it here Class has been compiled by a more recent version of the Java Environment, so I'm looking for a way to upgrade/downgrade the version of Java, but I can't find Java control panel anywhere, I tried check the "Control Panel\All Control Panel Items", tried small icons, I tried this command javaws -viewer on cmd, win Run, PowerShell but it gives me an error 'javaws' is not recognized as an internal or external command

What can I do?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
MiiRana
  • 15
  • 6
  • Make sure that Java 8 is uninstalled and install Java 11, and make sure environment variables like PATH or JAVA_HOME, if they exist, point to the right location (PATH to the bin directory of the Java install, JAVA_HOME to the root directory of the Java install). You don't need the Java Control Panel for this, and most recent Java installs don't even have a Java Control Panel anymore. – Mark Rotteveel Dec 30 '22 at 11:11
  • @MarkRotteveel I have java 19 for now, should I downgrade to 11? – MiiRana Dec 30 '22 at 11:38
  • The error indicates you have Java 8 (class version 52 is the highest class version supported by Java 8, 55 is the class version of Java 11). I'm not entirely familiar with the Android ecosystem, so I'm not sure if it works on Java 19. – Mark Rotteveel Dec 30 '22 at 11:38
  • @MarkRotteveel just tried java 11 and its the same issue! maybe i should change something else? – MiiRana Dec 30 '22 at 16:04
  • If you get the exact same error, then you're still actually using Java 8. – Mark Rotteveel Dec 30 '22 at 16:06
  • @MarkRotteveel not me at least, i used 19 then 11, maybe the creature of the code used java 8? – MiiRana Dec 30 '22 at 16:08

1 Answers1

0

Right-click on the Start button and select the Control Panel option. In the Windows Control Panel, click on Programs. Click on the Java icon to open the Java Control Panel.

  • 1
    Most recent Java installs no longer even have a Java Control Panel. – Mark Rotteveel Dec 30 '22 at 11:11
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 30 '22 at 13:10