4

This is the error:

Error:(23, 13) Failed to resolve: com.android.support.constraint:constraint-
layout:1.1.0-beta1
Upgrade plugin to version 2.3.3 and sync project
Show in File
Show in Project Structure dialog

When i click in upgrade plugin, nothing happens. I dont know how to fix this. I have tried adding the repository maven google but it doesn't work.

Here is the app code:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "com.google.googleio"
    minSdkVersion 22
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.1.0-beta1'
}
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
Wolvy
  • 141
  • 2
  • 12

1 Answers1

7

To use ConstraintLayout 1.1.0 beta1 you have to add the google maven repo:

repositories {
    maven {
        url 'https://maven.google.com'
    }
}

More info here.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • 2
    @ThomasVos To use `google()` you need also the plugin 3.3.x and gradle v.4.x. Check https://stackoverflow.com/questions/45781489/error6-0-gradle-dsl-method-not-found-google/45854844#45854844 – Gabriele Mariotti Aug 30 '17 at 12:58