How can I get the latest version of ConstraintLayout for Android?

43,474

Solution 1

EDIT: Now that we are publishing ConstraintLayout directly on maven, you can check the maven directory:

https://dl.google.com/dl/android/maven2/com/android/support/constraint/group-index.xml


Look in the SDK Manager in Android Studio. If you check the "Show Package Details" in the SDK Tools section, you should see all the available verions of ConstraintLayout (under Support Repository -> ConstraintLayout for Android)enter image description here

Solution 2

Google finally released the official version 1.1.0 ConstraintLayout So you can now import the non-beta

compile 'com.android.support.constraint:constraint-layout:1.1.0'

Check here for more info http://tools.android.com/recent/constraintlayout10isnowavailable

Solution 3

ConstraintLayout is included on the new(ish) AndroidX releases page. Here's the direct link to see the latest versions of ConstraintLayout by track (alpha, beta, rc, stable):

https://developer.android.com/jetpack/androidx/releases/constraintlayout

Current view:

Screenshot of Constraintlayout releases page

Solution 4

To Directly Pull in ConstraintLayout

Check the Maven repository for latest versions. Use the entire version name (e.g. 2.0.0-beta2).

Add dependency to target module:

target_module/build.gradle

If using support packages:

android {
  ...
}

dependencies {
  ...
  implementation `com.android.support.constraint:constraint-layout:some-version-number`
}

If using androidx packages:

android {
  ...
}

dependencies {
 implementation 'androidx.constraintlayout:constraintlayout:some-version-number'
}

Exact Gradle lines for 2.0.0-alpha5 can be found in the official release announcement.

Share:
43,474
Nabeel K
Author by

Nabeel K

"Make it work, make it right, make it fast" - kent beck.

Updated on July 09, 2022

Comments

  • Nabeel K
    Nabeel K almost 2 years

    When I try to use ConstraintLayout in my layout content_main.xml, I get the following message:

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

    I am currently using the following library dependency:

    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha5'
    

    How can I get the latest version number of constraint layout?

  • R. Zagórski
    R. Zagórski over 7 years
    There's even a new version: 1.0.1
  • Abhishek Singh
    Abhishek Singh over 7 years
    new version is 1.0.2
  • Lalit Fauzdar
    Lalit Fauzdar almost 7 years
    Newest is ConstraintLayout 1.1.0 beta 1.
  • Simon K. Gerges
    Simon K. Gerges almost 7 years
    Thanks, Lalit, we will update it once become production