Android Kotlin建议未显示在XML中
当我要设计activity_mail.xml时,我只是将布局类型更改为LinearLayout,但我无法编写任何我创建的类似于此的内容,我无法在EditText中写入android:layout_width高度为什么我不这样做Android Kotlin建议未显示在XML中,android,kotlin,Android,Kotlin,当我要设计activity_mail.xml时,我只是将布局类型更改为LinearLayout,但我无法编写任何我创建的类似于此的内容,我无法在EditText中写入android:layout_width高度为什么我不这样做 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" x
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText/>
</LinearLayout>
尝试以下方法:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:layout_height="wrap_content"
android:layout_width="match_parent" />
</LinearLayout>
Gradle(单击大象图标)或文件->激励缓存/重新启动不理解您的问题。请澄清我在上面编辑的内容,先生。我把EditText放在EditText里面,我没有写其他东西。为什么我不能在编辑文本中写入android:layout\u width height为什么我不能,请检查答案并让我知道检查此线程:先生,我的问题是如果我键入layout,则属性未显示不工作
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:layout_height="wrap_content"
android:layout_width="match_parent" />
<TextView
android:layout_height="wrap_content"
android:layout_width="match_parent" />
</LinearLayout>