I'm trying to up my target API to 26 (from 22), so far with some difficulty.
For some reason my Gradle continues thinking that 25.3.1 is still the latest version of support libraries.
So, here's my build.gradle for the library project:
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
publishNonDefault true
defaultConfig {
targetSdkVersion 26
minSdkVersion 14
versionCode 1
versionName "1.0"
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:25.3.1'
}
And the relevant sections from main project:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
targetSdkVersion 26
minSdkVersion 14
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(path: ':MyLibrary', configuration: 'debug')
}
It seems no matter what I do, Androd Studio will not recognise the repositories and offer to upgrade to support library version 26, yet complains when I include only version 25.
I just completed looking every SO question that looked even remotely relevant to the issue and pretty much all of them just dealt with adding the new repository into dependencies. Am I adding it incorrectly?
Trying to set support-v4 library to 26.0.2 version manually just results in "failed to resolve" gradle error.
What setting am I still missing to make this work for me?