[英]Error : Multiple annotations found at this line:
Multiple annotations found at this line: - [Accessibility] Missing contentDescription attribute on image 在此行找到多个注释:-[可访问性]图像上缺少contentDescription属性
and my xml Code is : 而我的xml代码是:
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/iv_Seelct_Image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/select_image"/>
<GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="270dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"/>
您需要将android:contentDescription="@string/desc"
作为属性添加到ImageView。
your xml file must have root layout like LinearLayout or RelativeLayout Like that 您的xml文件必须具有像LinearLayout或RelativeLayout这样的根布局
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<your imageview>
<your gridview>
</RelativeLayout>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.