相关疑难解决方法(0)

如何修复"设计编辑器在成功构建之前不可用"错误?

我从昨天开始学习Android Studio.我试着回应简单的"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>
Run Code Online (Sandbox Code Playgroud)

但是当我点击"设计"视图时,会出现此错误?

在成功构建之前,设计编辑器不可用

我该如何解决这个错误.我昨天刚刚下载了Android Studio.

在此输入图像描述

在此输入图像描述

我刚注意到我的xml代码导致错误.这就是为什么这可能不起作用.非常感谢

android-studio

84
推荐指数
10
解决办法
13万
查看次数

标签 统计

android-studio ×1