Home > Java > Javagetting Started > body text

IDEA compiles java and prompts that the symbol cannot be found

王林
Release: 2019-11-19 09:56:17
Original
69030 people have browsed it

IDEA compiles java and prompts that the symbol cannot be found

Problem:

This situation occurred when maintaining a new project. When the project was built, it kept reporting an error "xxx package not found", but the referenced package and referenced classes both exist.

Solution:

maven settings

First check the maven settings, do not use the default maven version:

IDEA compiles java and prompts that the symbol cannot be found

Maven-Reimport

IDEA compiles java and prompts that the symbol cannot be found

UTF-8

Encoding selection is set to UTF-8, do not use the default configuration:

IDEA compiles java and prompts that the symbol cannot be found

Invalidate Caches and Restart

Restart idea and try it

IDEA compiles java and prompts that the symbol cannot be found

Recompile

Select the module that reported the error and right-click. Click 'Build Module' and then start the project again. There is no error message anymore.

IDEA compiles java and prompts that the symbol cannot be found

Recommended tutorial: Java tutorial

The above is the detailed content of IDEA compiles java and prompts that the symbol cannot be found. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template