When idea imports dependencies, the import error problem is solved

The complete design involves nfc, so the dynamic library provided by the manufacturer needs to be used. I directly copied the jar package provided by the manufacturer into the project, and the structure import reported red.

analyze:

Click the red field of import, and find that the dependency will be searched from LIbranes, and the search result is not found.

The dependent JAR package introduced under Libraries is for the entire Project to use! So dependencies are not imported into Libraries.

solve:

1.File->Project Structure

2. Click on Libraries, Java means you can import dependencies from your original project, From Maven means you can download dependencies from maven

Because of my other projects, I have successfully introduced this dependency. I can choose java to find the jar package from the existing project and import it directly. Open the idea and look again, the problem is solved.

 

Guess you like

Origin blog.csdn.net/qq_56044050/article/details/124773687