Error:(30, 13) Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha4
-
try upgrading your gradle. read more at http://stackoverflow.com/questions/37992187/gradle-sync-failed-could-not-find-constraint-layout1-0-0-alpha2 – ישו אוהב אותך Jul 19 '16 at 08:08
-
Updated.Still not working. – Aditya Kumar Patro Jul 19 '16 at 09:31
-
4You have to have Android Studio 2.2 Preview to use ConstraintLayout, I'm getting the same error in android studio 2.1 – crgarridos Jul 20 '16 at 09:23
-
Please look at that [answer](http://stackoverflow.com/a/40245159/4260491). Maybe will help you! ;) – BVantur Oct 25 '16 at 16:36
-
In my case, the error is because "constraint-layout" was downloaded with a different md5 checksum. However, I found it still existed on my disk. So I just ignore the error and everything works fine. – cmoaciopm Feb 09 '17 at 07:44
4 Answers
I've found the fix:
- Download
Android Studio 2.2 Preview 7
- Update SDK Tools to the latest
25.2.1
- Download
ConstraintLayout and Solver for ConstraintLayout
in SDK Manager as per image below - Add
com.android.support.constraint:constraint-layout:1.0.0-alpha5
to gradle.build

- 5,727
- 49
- 55
-
1
-
for historical purposes I left the old versions of the answer, but using AS2.2 and downloading the needed libs from Support Repository is enough. – Henrique de Sousa Sep 20 '16 at 14:13
Well, I had the issue, that I updated the the ConstraintLayout and Solver dependecy like it was suggested it in the posts above. But still had the issue. My problem was, that the SDK Tools updated it to the latest version, in my case it was 1.0.0-alpha9, but in my gradle dependency was set to
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
So, you can change your gradle build file to
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
Or you check "Show package details" in the SDK Tools Editor and install your needed version. See screenshow below.

- 796
- 10
- 17
In Android Studio select: SDK Manager -> SDK Tools -> check 'com.android.support.constraint:constraint-layout:1.0.0-alpha4' in bottom of list and press 'OK' for installing this and updates, proposed by Android Studio.

- 58
- 1
- 9
If nothing of this helps , Create a new android Project and check its build.gradle(module:app) and check for constraint compile/implementation. Copy that to your app build.gradle(module:app).
That should do the work :-)

- 281
- 3
- 9