In the past, the project could be built on Jenkins normally. Today, it is suddenly found that the construction is wrong. The problems are as follows:
Could not determine the dependencies of task ':lint'.
> Could not resolve all artifacts for configuration ':releaseUnitTestCompileClasspath'.
> Could not resolve junit:junit:4.+.
Required by:
project :
> Failed to list versions for junit:junit.
> Unable to load Maven meta-data from http://jcenter.bintray.com/junit/junit/maven-metadata.xml.
> Could not get resource 'http://jcenter.bintray.com/junit/junit/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/junit/junit/maven-metadata.xml'.
> org.apache.http.client.ClientProtocolException (no error message)
> Skipped due to earlier error
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Gradle plug-in version 4.1.2, gradle version 6.5
The solution to this problem is as follows:
1. Find the build.gralle file of moudle.
Modify testImplementation 'junit:junit:4.+'
to testImplementation 'junit:junit:4.12'
2. Find the following places in the gradle compilation file used by Jenkins server and modify it to the following information
allprojects {
repositories {
jcenter { url "http://jcenter.bintray.com/"}
google()
maven { url 'http://repo1.maven.org/maven2' }
}
}
Then use Jenkins to build again, and the APK can be built normally.
Read More:
- [Solved] Android Studio Compile Error: Invalid main APK outputs : EarlySyncBuildOutput
- [Solved] Android Studio Generate APK Error: error_prone_annotations.jar (com.google.errorprone:error)
- Apk Failed to install Error: [install\u failed\verification\u failure]
- [Solved] Jenkins-ERROR: Error cloning remote repo ‘origin‘
- APK Install Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- Jenkins Error: code=exited, status=127 [How to Solve]
- Jenkins uses NPM to build Vue error, and the manual build is normal
- Android Studio: How to Solve APK error in mobile phone installation
- [Solved] Unity packaged and exported apk error: Failed to load libmain.so’
- Jenkins reported an error when running the docker permission in the shell script
- [Solved] jenkins-deleteDir Error (FilePath is missing)
- [Solved] Vite Project jenkins Auto Package Error: failed to load config from ../vite.config.js You installed esbuild on
- Jenkins error: exception message 137
- Ionic3 update open apk android 8.0 error FileUriExposedException
- jenkins pipeline Shared Library Error: No signature of method
- Apache Altas Compile Error: [ERROR] Failed to execute goal on project atlas-testtools: Could not resolve
- [Solved] Android Studio APK install Error: INSTALL_FAILED_CONFLICTING_PROVIDER
- [Solved] Android Studio Compile Error: Execution failed for task ‘:APP_MIDI:lintVitalRelease‘.
- Nexus3 builds Jenkins error: Not authorized (Downloading dependent jar package error)
- [Solved] Flutter package flutter build apk Error: permission-handle