I've got an old Android project with the following build.gradle file:
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 116
}
}
dependencies {
//compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
}
Syncing the project with gradle files results in:
Failed to resolve org.apache.commons:commons-lang3:3.4
But, I think I've got the syntax correct according to this:
https://search.maven.org/#artifactdetails%7Corg.apache.commons%7Ccommons-lang3%7C3.4%7Cjar
Can anyone tell me what I'm missing here?
N.B. if I download the jar and put it in my project's libs directory then uncomment the fileTree line everything works, though I am told that I am not supposed to be doing this.