Cannot resolve org.mockito:mockito-all:1.9.5
时间: 2024-05-23 11:11:04 浏览: 141
The error "Cannot resolve org.mockito:mockito-all:1.9.5" typically means that your project cannot find the Mockito library version 1.9.5. This could be due to a few different reasons:
1. The version number is incorrect or outdated. Try updating the version number to the latest version of Mockito.
2. The repository containing the Mockito library is not included in your project's build configuration. Check that your project's build file (e.g. build.gradle or pom.xml) includes the repository containing the Mockito library.
3. There may be an issue with your internet connection or the repository server. Try refreshing your repository cache or using a different network connection.
To resolve this issue, you can try the following steps:
1. Check that the version number specified in your project's build configuration matches the version you want to use.
2. Add the repository containing the Mockito library to your project's build configuration (e.g. by adding the following line to your build.gradle file: "mavenCentral()").
3. Try refreshing your repository cache by running the command "gradle clean build --refresh-dependencies" or "mvn clean install -U" in your project directory.
4. If none of the above steps work, you can try manually downloading the Mockito library and adding it to your project's dependencies.
阅读全文