0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical" android:layout_width="match_parent"
        android:layout_height="match_parent">

    <!--here the error showing-->
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:hint="Enter email"
        android:id="@+id/emailEdit" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:hint="Enter password"
        android:id="@+id/passwordEdit"
        android:inputType="textPassword" />

    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="4dp"
        android:text="Log in"
        android:id="@+id/login" />

</LinearLayout>

我收到“此处不允许元素编辑文本”的代码错误,请帮我解决问题.. 并且预览无法在 android studio 上打开

4

1 回答 1

0

尝试更改为这些版本。

compileSdkVersion 28
buildToolsVersion "28.0.1"

targetSdkVersion 28
于 2020-01-05T07:40:30.823 回答