Android layout Android Studio自动生成XML标记

Android layout Android Studio自动生成XML标记,android-layout,android-studio,Android Layout,Android Studio,如果我在一个布局文件中,按CMD/CTRL+N,我可以选择XML标记或版权。当我选择XML标记并从列表中选择TextView时,它会生成以下内容: <TextView layout_width="" layout_height=""/> 这是一个错误,因为它应该是 <TextView android:layout_width="" android:layout_height=""/> 有人知道如何解决这个问题吗 完整的XML代

如果我在一个布局文件中,按CMD/CTRL+N,我可以选择XML标记或版权。当我选择XML标记并从列表中选择TextView时,它会生成以下内容:

<TextView
    layout_width=""
    layout_height=""/>

这是一个错误,因为它应该是

<TextView
    android:layout_width=""
    android:layout_height=""/>

有人知道如何解决这个问题吗


完整的XML代码

<FrameLayout 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"
             tools:context="cc.zahid.cheatsheet.MainFragment">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="@string/hello_blank_fragment"/>

    <android.support.design.widget.CoordinatorLayout
        android:id="@+id/rootLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">


        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="20dp"
            android:src="@android:drawable/ic_dialog_email"/>

    </android.support.design.widget.CoordinatorLayout>

</FrameLayout>


请看这里,编辑模板,因为它将使用android自动完成:而不是不使用

找不到任何可以解决该问题的内容。更新了我的问题:)
Settings > Editor > File and Code Templates > Other > layoutResourceFile.xml