Tag Archives: Android build failed

Failed to resolve: package name resolution

Some students often encounter the problem of failed to resolve: dependent project name, which can’t be solved repeatedly

I have summed up some solutions here, and I will explain them

1. If the dependent project needs to configure the remote warehouse, please check whether the project’s build.gradle has configured the remote warehouse, and note that the warehouse should be configured in this location

Of course, what you need to do is to check whether the dependency you declared is correct.

2. If the remote configuration is good, but the error is still reported, then there are two other possibilities

One of them is that you may accidentally turn on offline mode: offline work mode. Check it out. This is in this position

If this is not checked, then it is not the problem. If this is checked, it means that you have turned on offline mode, so you just need to turn it on.

3. But if it’s normal here, what you’re doing now is to rebuild it

4. If the rebuild fails, you need to restart Android studio  
5. OK, if all of the above have been used, I’m sorry to tell you that your network is too slow, or your computer can’t access the network at all, which leads to the failure of downloading.

6. There is also a wonderful problem. When I was dealing with a push, I encountered the problem that the imported push dependent package could not be downloaded all the time, indicating that the dependent package could not be found. Then my solution is to download one push jar package after another, and then rely on the used one.

The above solutions can solve the general problem of project construction, if there are other forms of problems, welcome to leave a message, let’s discuss~~~~

see you~~~