"Cannot resolve symbol" everywhere in all projects

已回答

Hello,

I was writing some java code yesterday and suddenly everything starting not working anymore. I get "cannot resolve symbol" everywhere. I don't even know what I did! Its not only happening in the project where I was working in but in all projects that I have. If I open a project with another IDE I get the same problem. I think IntelliJ broke something and now I have a massive general maven problem. I tried everything but and it still doesn't working.

I am using Intellij IDEA 2021.3 (Community Edition), apache-maven-3.8.4, Amazon Corretto\jdk17.0.1_12

I already tried:

- Invalidate Caches /Restart

- remove local repository

- installed the newest Intellij version

- installed the newest maven manually (apache-maven-3.8.4)

- installed the newest JDK manually (Amazon Corretto\jdk17.0.1_12)

- mvn build gets from cmd window a Build Failure and mvn compile a compilation error

 

My POM looks like that:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>tradeTracker</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

 

In project structure there are many red sources. See image below

 

Please I need help

Thanks

0

Please check that your SDK is properly set.

0

请先登录再写评论。