我在ImageView
了这一警告之前‘’[Accessibility] Missing contentDescription attribute on image
“然后我加入这个代码到它:在包中发现的属性'contentDescription“机器人没有资源标识符
android:contentDescription="@string/desc"
,现在我面临错误
No resource identifier found for attribute 'contentDescription' in package 'android
这是我的代码:
<ImageView
android:id="@+id/handle"
android:layout_width="48dip"
android:layout_height="48dip"
android:contentDescription="@string/desc"
android:src="@drawable/icon"
/>
不是错误的答案,但可以保存忽略警告。虽然它可能是一个很好的做法,也可以添加说明,但没有它们就可以正常工作:) – Nanne 2012-01-15 11:03:41
我很困惑,因为在第一个地方我只有几个警告,没有错误,但我无法运行应用程序,我不知道为什么! – user1143529 2012-01-16 15:56:21