ImageView出现警告:
Missing contentDescription attribute on image
解决方法:
方法一:默认将此类警告设置为ignore
第一步:windows-->preferences

第二步:

方法二:
imageview和imagebutton一样,也会出现这一警告。
在该组件下添加这样一个属性-----android:contentDescription="@string/desc",然后将对图片的文本描述添加到string.XML文档中。
作用是可以确保图片组件可以提供一个文本描述。
网友评论