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?
constraintlayout:constraintlayout:2.1. 0 is released. This is the final release for 2.1. 0.
Open the layout file (activity_main. xml) in Android Studio and click the Design tab at the bottom of the editor window. In the Component Tree window, right-click LinearLayout and then choose Convert layout to ConstraintLayout from the context menu.
A ConstraintLayout is a ViewGroup which allows you to position and size widgets in a flexible way. Note: ConstraintLayout is available as a support library that you can use on Android systems starting with API level 9 (Gingerbread). As such, we are planning on enriching its API and capabilities over time.
The default bias is 0.5, meaning that the widget is centered in the available space. For the horizontal axis, 0.0 means "slide the widget all the way towards the start side" and 1.0 means "slide the widget all the way towards the end side". – CommonsWare.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With