Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/190.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 错误:在此行找到多个批注:_Android_Xml - Fatal编程技术网

Android 错误:在此行找到多个批注:

Android 错误:在此行找到多个批注:,android,xml,Android,Xml,在此行找到多个批注: -[Accessibility]缺少contentDescription属性 论形象 我的xml代码是: <?xml version="1.0" encoding="utf-8"?> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/iv_Seelct_Image" andro

在此行找到多个批注: -[Accessibility]缺少contentDescription属性 论形象

我的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。

您的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>

阅读更多信息,当出现此类警告时,这将用于图像上的[Accessibility]缺少contentDescription属性