每个TextView和Button以及LinearLayout标签都抱怨
'layout_height' attribute should be defined
'layout_width' attribute should be defined
这是我的activity_main.xml:
xmlns:android="http://schemas.android.com/apk/rest/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/main_title" />
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label" />
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/new_game_label" />
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/about_label" />
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/exit_label" />
我正在运行Android Studio 1.1.0
解决方法:
将您的xmlns属性更改为:
xmlns:android =“ http://schemas.android.com/apk/res/android”
/ res /不是/ rest /
标签:android-layout,android
来源: https://codeday.me/bug/20191120/2045956.html