Reputation: 1226
I'm currently moving my project to Gradle, this project with mutliple branches is currently being built by Jenkins.
After building the application fine in Android Studio, I have pushed my commits and have run into a little snag: Jenkins doesn't seem to understand where to find the support libraries.
A problem occurred configuring root project 'Android_Alpha_Gradle'.
A problem occurred configuring project ':HereAndNowAPI'.
Could not resolve all dependencies for configuration ':HereAndNowAPI:_debugCompile'.
Could not find com.android.support:appcompat-v7:19.0.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/appcompat-v7/19.0.0/appcompat-v7-19.0.0.pom
https://repo1.maven.org/maven2/com/android/support/appcompat-v7/19.0.0/appcompat-v7-19.0.0.jar
https://jcenter.bintray.com/com/android/support/appcompat-v7/19.0.0/appcompat-v7-19.0.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/19.0.0/appcompat-v7-19.0.0.jar
Required by:
Android_Alpha_Gradle:HereAndNowAPI:unspecified
Could not find com.android.support:support-v4:22.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/22.2.0/support-v4-22.2.0.jar
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.jar
Required by:
Android_Alpha_Gradle:HereAndNowAPI:unspecified
Obviously this machine is headless and I'm not exactly sure how I can install the Android Support Repository via the command line. Any ideas?
Upvotes: 2
Views: 1988
Reputation: 101
Apparently Google decided not to publish to JCenter or MavenCentral. You have to run android sdk update with extra-android-m2repository. Jake Wharotn's SDK Manager plugin handles this download for you.
Upvotes: 2
Reputation: 645
Use this awesome SDK Manager plugin
https://github.com/JakeWharton/sdk-manager-plugin
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
}
apply plugin: 'android-sdk-manager'
Upvotes: 6