[英]ImageView inside LinearLayout not working
我具有以下布局,每次尝试在“ Graphical Layout
查看它时,都会显示以下错误消息。
<?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="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/my_greeting" />
</LinearLayout>
错误
找不到以下类:-ImageView(更改为android.widget.ImageView,修复构建路径,编辑XML)
关闭该文件,然后重新打开。 如果无法解决问题,请清理并重建项目。
它必须与您的图像源my_greeting
做些事情。 检查源名称是否正确,并检查是否提供了有效的扩展名。 另外,尝试清洁项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.