Invalid runtime for JavaSE-11: Runtime at is not compatible with the 'JavaSE-11' environment

224 views Asked by At

I'm programming in React Native and until yesterdar my code works correctly on the physical device, but not in emulator. In a moment I needed to use emulator and I was trying to run app in emulator, but how that I said, it was not founding.I tried every way and in the end it still doesn't work, but with another error. Today I back to use the device that was working, but due to the changes, now until the device cannot run my code.

In the vscode, appears 2 errors in pop up:

  1. Invalid runtime for JavaSE-11: Runtime at 'C:\Users\Interfocus\AppData\Local\jdk-11.0.2' is not compatible with the 'JavaSE-11' environment.
  2. Invalid runtime for JavaSE-1.8: Runtime at 'C:\Program Files\Java\jdk-21' is not compatible with the 'JavaSE-1.8' environment.

And many messages appear in the problems, as shown in the screenshot:

enter image description here

And I don't know if it's related, but even when the code was working on the physical device, whenever I opened vscode, this pop up appeared:

enter image description here

When I run 'expo run:android' in terminal, the message below is shown, but i this that this inst the real problem because the app runs and when it runs, this is the screen that open (image below):

The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.

enter image description here

I just want to solve this, but I don't know how. Can someone help me?

0

There are 0 answers