Android Studio 3 - Constraint layout editor broken

僤鯓⒐⒋嵵緔 提交于 2019-11-30 21:45:56

问题


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:

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


回答1:


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.




回答2:


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




回答3:


downgrading it to beta1 solved my problem




回答4:


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

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




回答5:


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.




回答6:


Adding

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

to the dependencies and reloading project solved my issue



来源:https://stackoverflow.com/questions/44588343/android-studio-3-constraint-layout-editor-broken

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!