我爲我的Android項目自動構建Jenkins。 由於VM已禁用互聯網,我下載gradle.2.2.2.pom來自:Jenkins:從Gradle 2.2.2.pom com.android.tools.build:gradle:2.2.2
https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
在我的build.gradle我已經掛了gradle這個-2.2.2.pom文件是這樣的:
buildscript {
repositories {
jcenter{
url file("C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom")
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
但是,還是我收到此錯誤:
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:2.2.2.
Searched in the following locations:
file:/C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
file:/C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
Required by:
:LocationSensing:unspecified
任何想法,我應該怎麼做?我已經下載並鏈接了.pom文件構建系統問我。
你確定該文件存在嗎? file:/ C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom –