我刚刚更新了我的Android Studio和Android SDK,现在我无法在我的XML文件中做任何事情。和以前一样的显示,但我不能添加任何东西,而且出现了一些问题。
例如:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/bocterAppLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/bocterapp"
android:contentDescription=""/>
</LinearLayout>
出现了错误,错误信息为:“在此处不允许使用 ImageView 元素”。
您有任何想法是为什么会发生这种情况吗?
谢谢!