如何修复“在成功构建之前设计编辑器不可用"?错误? [英] How can I fix "Design editor is unavailable until a successful build" error?
本文介绍了如何修复“在成功构建之前设计编辑器不可用"?错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始学习 Android Studio.我试着呼应简单的Hello World":
I started to learn Android Studio. I try to echo out simple "Hello World":
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/activity_main"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>
但是当我点击设计"时看,显示这个错误?
but when I clicked "design" view, this error is showing?
在构建成功之前,设计编辑器不可用
Design editor is unavailable until a successful build
我该如何解决这个错误.
How can I fix this error.
我刚刚注意到我的 xml 代码导致错误.这就是这可能不起作用的原因吗?
I just noticed that my xml code is causing error. Is that why this may be not working?
推荐答案
转到文件 > 将项目与 Gradles 文件同步.
Go to File > Sync Project with Gradles Files.
这篇关于如何修复“在成功构建之前设计编辑器不可用"?错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文