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:
- How to Solve Project Upgrade to flutter2.5.0 Error
- How to Solve Gradle Error: Plugin with id ‘jetty’ not found.
- [Solved] Jenkins-ERROR: Error cloning remote repo ‘origin‘
- Flutter android studio runs gradle build error: Could not resolve all artifacts for configuration’:classpath’.
- How to Solve Maven Error: Return code is: 501 , ReasonPhrase:HTTPS Required.
- Prompt unknown error in pom.xml of Maven project
- [Maven] Pom.xml error: Cannot detect Web Project version.
- [Solved] Unity Package Error: FAILURE: Build failed with an exception.
- [Solved] Error: Cannot fit requested classes in a single dex file (# methods: 149346 > 65536)
- Springboot package error: failed to execute goal org.apache.maven.plugins:maven-resources-plugin: 3.2.0…
- [Solved] pod Error: back off restarting failed container
- [Solved] Android app development version update failed, Android – error: task execution failed ‘: app: com
- How to Solve Error “Could not find com.android.tools.build:gradle:3.0.1”
- Gateway Error: Cannot resolve org.springframework.cloud:spring-cloud-starter-gateway:unknown
- Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment
- ### Error building SqlSession. ### The error may exist in com/itrs/mapper/UserMapper.xml ### Cause:
- [Solved] Mybatis:Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.
- Execution failed for task ‘:app:kaptDebugKotlin‘ [How to Solve]
- How to Solve Archetype generate Error
- [Solved] UE4 Android Package Error: failed for task :permission_library:compileDebugJavaWithJavac