21

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 :)

Benoit
  • 1,168
  • 8
  • 16
  • try changing api level in editor preview currently showing 26 change it to lower and check. – Pavan Jun 16 '17 at 12:59
  • 2
    @Pavan it was actually the support lib version, I was using 26.0.0-beta2 and downgrading to 26.0.0-beta1 solved it (see Nicolas's answer). Thanks for your help. – Benoit Jun 16 '17 at 14:53

6 Answers6

21

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.

Nicolas Roard
  • 8,339
  • 1
  • 28
  • 30
  • 1
    Thanks Nicolas, it was the support lib that was messing with the editor. Downgrading to 26.0.0-beta1 solved it. Cheers. – Benoit Jun 16 '17 at 14:52
  • 1
    Yes this fixed it for me too, but make sure adjust any modules running beta2 as well – Joe Maher Jun 28 '17 at 04:48
  • 1
    I was having the same issue but for me, changing to use the beta version of constraint layout fixed the problem 'com.android.support.constraint:constraint-layout:1.1.0-beta1' – riggaroo Jul 11 '17 at 06:56
2

Just change the "Apptheme" to "AppCombat.NoActionBar"

kurtzmarc
  • 3,110
  • 1
  • 24
  • 40
A.Najafi
  • 691
  • 1
  • 9
  • 20
0

downgrading it to beta1 solved my problem

INI HOOD
  • 57
  • 1
  • 5
0

Go in build.gradle and change the dependencies to 26.0.0-beta1:

enter image description here

After Sync the project... Its works to me!!!!

Community
  • 1
  • 1
Douglas
  • 479
  • 4
  • 7
  • This answer provides the same advice as existing answers. In the future please vote up an existing answer if it is helpful instead of duplicating existing content. – avojak Jul 18 '17 at 17:58
0

What worked for me was to UPGRADE all my dependencies to the latest version (currently 27.0.0) instead of doing a downgrade. It brings some additional effort to replace the "compile" dependencies (which are deprecated) by "implementation" or "api" and upgrade also some of the libraries. But after all the upgrades the tool worked again perfectly.

0

Adding

implementation 'com.android.support.constraint:constraint-layout:1.1.2'

to the dependencies and reloading project solved my issue

Afshin Izadi
  • 527
  • 1
  • 6
  • 13