Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3 - Constraint layout editor broken

Tags:

I'm using Android Studio 3.0 (updated to canary 4 today) on macOS for a side project and recently (not sure really when) the constraint layout editor stopped working properly.

Now it just shows a grey window and the blueprint view isn't working at all. Even the properties editor on the right doesn't show the constraints anymore.

Here how it looks for a simple layout with just 1 button:

Android constraint layout editor broken

I'm using constraint layout 1.0.2 but it fails the same way on 1.1.0-beta1.

Any idea what could go wrong? No error are shown in the IDE or in the idea.log

Thanks in advance for any help provided :)

like image 783
Benoit Avatar asked Jun 16 '17 11:06

Benoit


People also ask

How do I change ConstraintLayout?

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.

What is the use of ConstraintLayout in Android?

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.

Can we use RelativeLayout inside ConstraintLayout?

You can't use relative layout directly inside constraint layout. Intention of ConstraintLayout is to optimize and flatten the view hierarchy of your layouts by applying some rules to each view to avoid nesting.

How do you set a barrier in constraint layout?

To define a Barrier , you can select one or more View components from the “Design” view, open the “Guidelines” menu and select the Barrier . If you want to add it directly in the XML, you can use the following code snippet: The resulting layout looks like the screenshot of the “Design” layout editor view from below.


1 Answers

Which gradle version are you using? Also, support lib 26.0.0-beta2 has an issue with studio, if you are using it you should downgrade to beta1 to use the editor.

like image 149
Nicolas Roard Avatar answered Oct 20 '22 10:10

Nicolas Roard