Cannot resolve symbol String in Intellij Idea - Quarkus project

Viewed 2596

I tried using both gradle and maven. This issue is coming with both. I have also tried invalidating caches but no luck. When I run project using ./gradlew quarkusDev it runs without error.

I have created project using code.quarkus.io and then imported in Intellij Idea 2020.1.1.

using openJDK 11

gradle.properties:

  • quarkusPluginVersion=1.4.2.Final
  • quarkusPlatformArtifactId=quarkus-universe-bom
  • quarkusPlatformGroupId=io.quarkus
  • quarkusPlatformVersion=1.4.2.Final

enter image description here

Edit: please tell something other than invalidate/restart, deleting iml files, setting JDK version in project structure. I have already tried these steps.

Edit 2: There seems to be some problem with jdk 11 version that comes with intellij Idea 20 snap in my case. After downloading openJDK 11 separately and pointing to it from project structure. My problem was solved.

2 Answers

Update the JDK of the project from fileproject structureproject settingsproject

Project SDK and select the proper JDK to the project

In IntelliJ IDEA IDE these kind of error occurs with compiling due to problems with the incorrect JDK set up in your IDE.

You need to set up the right JDK.

Follow these steps to set up your JDK :

  1. Go to 'File' (ALt+F)

  2. Click on 'ProjectStructure'

  3. Click on 'Project' under 'ProjectSetting' (Ctrl + Alt + Shift + S)

  4. Select the correct JDK from the 'Project SDK' dropdown

  5. Hit 'OK'

This should start recompilation of your program.

If the issue, still persist then try restarting your IDE.

Related