IDEA's dependency package report red issue

Problem phenomenon:

When importing the project today, I found a problem:

Dependent package error:

 


problem analysis:

In this case, I usually follow the following steps to solve it:

1. Open the local warehouse directory folder: search keyword:    .lastUpdated

Find all  files with the suffix .lastUpdated and delete them all;

2. Open Idea's Settings again, update the local warehouse, and update other warehouses at will.

Then re-import the dependency package:

3. If you still rely on the package to report red, then you can try the following methods:

Find the settings.xml file in the local maven installation directory, and you can modify the configuration after opening it

<localRepository></localRepository>: used to specify the local library path

<mirror></mirror> is used to specify the download mirror source address, because maven downloads foreign library resources by default, so often due to slow downloads and packet loss, the dependent packages are incomplete, and they cannot be downloaded or even do not exist. Therefore, you can specify the domestic mirror source address here, so that maven can download the dependent packages from the country. Not only the foreign dependent packages are basically available, the download speed is fast, but also some practical dependent packages developed by the Chinese can be downloaded.

After restarting IDEA

Re-import the reimport dependency package again!

 

Guess you like

Origin blog.csdn.net/weixin_42585386/article/details/109157865