Idea error: (4, 28) Java: package com.alibaba.fastjson does not exist

The package has been imported through Maven in DEA, and the location of the package can also be located in idea, but error is always reported when compiling, and the package cannot be found.

Presumably, the reason is that the version of idea is incompatible with the build built by Maven

It is recommended to uninstall the idea and install it with another version of the idea. If you do not want to replace the idea, you can take the following measures.

The solution is as follows:

Hosting the build and run of idea under maven

When checked, recompilation can run normally

Read More: