When I checked each library provider to update the library for the first time in a long time, the ** Android Support Library ** was updated. It was also changed from the Beta version to the Release version, so this is a bad guy to put in.
Immediately rewrite the character string * 26.0.0-alpha1 *, which has a Beta feeling, to * 26.1.0 * and click Sync Now
...
Failed to resolve: com.android.support:support-v4:26.1.0
- Install Repository and sync project
- Show in File
- Show in Project Structure dialog
why.
I looked it up a lot, but the official page only says something like "Download from the maven repository from now on!", So it's refreshing what to do.
But a kind person wrote it firmly on the bulletin board, so share it with everyone ...
build.gradle(Project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
}
}
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
...
targetSdkVersion 26
...
}
buildTypes {
...
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:26.0.0-alpha1' // -> 26.1.0
compile 'com.android.support:support-v4:26.0.0-alpha1' // -> 26.1.0
compile 'com.android.support:design:26.0.0-alpha1' // -> 26.1.0
}
As I wrote at the beginning, all I have to do is "make access to google's maven repository". I just added one line ...
build.gradle(Project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' } //change point
}
}
Even though the official website says "Add maven repository", if you jump to the link below it, the conventional method (non-maven) is shown, and it feels like something.
Recommended Posts