简体   繁体   English

错误:在此行发现多个注释:

[英]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.

相关问题 错误:在此行发现多个注释: - error: Multiple annotations found at this line: “在这一行发现了多个注释” - "Multiple annotations found at this line" 在此行找到多个注释: - Multiple annotations found at this line: 在此行找到多个注释 - Multiple annotations found at this line 在此行找到多个注释: - Multiple annotations found at this line: 在此行发现多个注释:-错误:在包&#39;android&#39;中找不到属性&#39;layout_alignBaseLine&#39;的资源标识符 - Multiple annotations found at this line: - error: No resource identifier found for attribute 'layout_alignBaseLine' in package 'android' 在此行发现多个注释:-错误:在包中找不到属性&#39;fetch_user_info&#39;的资源标识符 - Multiple annotations found at this line: - error: No resource identifier found for attribute 'fetch_user_info' in package 在此行找到多个注释:第一个程序Android Programming_ The Big Nerd Ranch Guide f - Multiple annotations found at this line: first program Android Programming_ The Big Nerd Ranch Guide f 在此行发现多个注释:-文档中根元素之后的标记必须格式正确 - Multiple annotations found at this line: - The markup in the document following the root element must be well- formed Retrofti 2:找到多个 Retrofit 注释,只允许一个。 (参数#1) - Retrofti 2: Multiple Retrofit annotations found, only one allowed. (parameter #1)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM