8

I'm starting using Android Studio 2.2 and trying to play with ConstraintLayout but when I let android studio add it automatically it showed me that error

Using version 1.0.0-alpha7 of the constraint library, which is obsolete

when I try to upgrade it using quick fix I get that error

Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8.

I think this is a bug in Android Studio. What should I do to fix it?

my current solution is to suppress the error.

guo
  • 9,674
  • 9
  • 41
  • 79
humazed
  • 74,687
  • 32
  • 99
  • 138
  • 1
    What version of the Android Plugin for Gradle are you using, from your top-level `build.gradle` file? Have you downloaded the `ConstraintLayout` bits in the SDK Manager? – CommonsWare Sep 22 '16 at 13:17
  • thanks, this was my problem, I was thinking gradle will download it like any other library, and what's more confusing is that I need to use the new SDK Manager. – humazed Sep 22 '16 at 17:17
  • 2
    My understanding was that Gradle *was* going to be able to download the `ConstraintLayout` artifacts automatically as needed. Perhaps that is being held off until `ConstraintLayout` is fully released, rather than being in an alpha state. – CommonsWare Sep 22 '16 at 17:21
  • Please look at that [answer](http://stackoverflow.com/a/40245159/4260491). Maybe will help you! ;) – BVantur Oct 25 '16 at 16:38

3 Answers3

18

File - Settings - Appearance & Behavior - System Settings - Android SDK

Remember choose "show detail". You should see the latest version of Constraint Layout. enter image description here

TmTron
  • 17,012
  • 10
  • 94
  • 142
guo
  • 9,674
  • 9
  • 41
  • 79
10

You need to install ConstraintLayout for Android inside Support Repository package on SDK Tools category of SDK Manager.

simplebe
  • 228
  • 3
  • 14
2

You are getting this warning because you are using older version of constraint layout while you have newer version available. Go to your sdk manager->sdk tools->Support Repository->ConstraintLayout For Android and then tick the Show Package Details checkbox to find the available versions of constraint layout and install the newest version and update your build.gradle(App Level).

Up until now the newest version is constraint-layout:1.0.2 so use this.

B.shruti
  • 1,589
  • 1
  • 21
  • 41