Android studio design editor is unavailable until after a successful project sync

好久不见. 提交于 2020-05-11 17:50:58

问题


what is the actual root cause of this issue? I already sync with gradle files but eventually failed.

image screen


回答1:


Just sync your project with gradles. File --> Sync Project with Gradle Files




回答2:


  1. Build -> Clean Project
  2. Build -> Rebuild Project
  3. File -> Sync project with gradle files . If not worked then try

    File -> Invalidate Caches / Restart .

It's work for me !!!




回答3:


That could be fixed in one or two steps, depending on how nice is Android Studio today:

  1. Try to sync your project with gradle files:

  1. If that doesn't work, invalidate Android Studio caches and restart. That should fix the problem:

The reason behind the first solution not working could be related on gradle cached dependencies problems, but who knows 🤷




回答4:


Issue happened to me when I changed the res>values>styles.xml

What I change was
"Theme.AppCompat.Light.DarkActionBar" --->>> "Base.Theme.AppCompat.Light.DarkActionBar"

Solutions I tried.

  1. Build -> Rebuild Project (Not worked)
  2. Close all files and Open again. Then Build -> Clean Project (Not worked) File -> Sync project with gradle files (Not worked)
  3. Close the Android Studio while project still opened. Opened it again. - It Worked.



回答5:


Just you have to do >> open File --> Sync Project with Gradle Files and then after >> open File --> invalidate Android Studio caches / restart so done this problem.:)




回答6:


If nothing of the above steps work, Then simply undo the changes that you have recently made, and then build gradle. In my case, I have added one dependencies and this problem raised, so I removed that dependencies build the gradle and then again add it. Problem Solved..!!



来源:https://stackoverflow.com/questions/53195701/android-studio-design-editor-is-unavailable-until-after-a-successful-project-syn

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