design editor is unavailable

I started to learn Android Studio from yesterday. I try to echo out simple «Hello World»:

but when I clicked «design» view, this error is showing?

Design editor is unavailable until a successful build

How Can I fix this error. I just downloaded Android Studio yesterday.

I just noticed that my xml code is causing error. that is why this may be not working. Thank you so much

15 Answers 15

Go to File > Sync Project with Gradles Files.

For me this is working

File -> Sync project with Gradle files

Quit the Android Studio ( not close the project Quit the Android Studio ) then open the project and go to Android Studio > Build > Clean Project

Then Android Studio > File > Sync Project with Gradles Files as the pic below

If your problem still exists then click the Install build tool as the pic below and then Android Studio > File > Sync Project with Gradles Files

Я начал изучать Android Studio со вчерашнего дня. Я пытаюсь повторить простой «Hello World»:

но когда я нажал «дизайн» представление, эта ошибка показывает?

Редактор дизайна недоступен до успешной сборки

Как я могу исправить эту ошибку. Я только что скачал Android Studio вчера.

Я только что заметил, что мой код XML вызывает ошибку. вот почему это может не работать. огромное спасибо

Перейдите в Файл> Синхронизировать проект с файлами Gradles.

Для меня это работает

Файл> Синхронизировать проект с файлами Gradle

Выйдите из Android Studio (не закрывайте проект. Quit из Android Studio ), затем откройте проект и перейдите в Android Studio > Build > Clean Project

Затем Android Studio > File > Sync Project with Gradles Files как Android Studio > File > Sync Project with Gradles Files ниже.

Если ваша проблема по-прежнему существует, выберите инструмент «Установить сборку», как Android Studio > File > Sync Project with Gradles Files ниже, а затем Android Studio > File > Sync Project with Gradles Files

March 2019

857 раз

какова фактическая причина этой проблемы? Я уже синхронизироваться с Gradle файлами, но в конечном счете не удалось.

4 ответы

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 ��

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.
  1. Build -> Clean Project
  2. Build -> Rebuild Project

File -> Sync project with gradle files . If not worked then try

File -> Invalidate Caches / Restart .

It’s work for me .

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

Источник: computermaker.info

Понравилась статья? Поделиться с друзьями:
Ок! Компьютер
Добавить комментарий