Problem :
Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2.
Required by:
myapp:app:unspecified
i'm try constraint layout dependency update available 1,and plugin gradle alpha-6,it worked
Ensure you have the maven.google.com repository declared in your module-level build.gradle file
repositories {
maven {
url 'https://maven.google.com'
}
}
2.Add the library as a dependency in the same build.gradle file:
dependencies {
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
The fix is to update the android gradle plugin in your build.gradle.
This should work: classpath 'com.android.tools.build:gradle:2.2.0-alpha2'
Or you can use the latest: classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
In my case, I had to remove the previous versions first and download the latest one instead. v1.0 stable was released on Feb 23rd.
In my case, I had a multi-module project called "app" and "sdk". The "sdk" module is the one where I had added the constraint layout library. I got the error when I tried to incorporate "sdk" into a new multi-module project called "app2". The solution was to ensure I had added the Google Maven Repository to the project-level build.gradle file for "app2". The Google Maven Repository can be added by putting "google()" under allprojects.repositories
in the project-level build.gradle file:
allprojects {
repositories {
jcenter()
google()
}
}
Just to make sure that in studio version 2.3 you won't see a dropdown near constraint-layout in sdk tools, it will by default install the latest version
To get the desired version check the box saying show package details and boom you can now choose the desired version you want to install