android開發中在配置文件中使用ImageView有時會引起Missing contentDescription attribute on image.比如:在main.xml中增加ImageView控件時如果沒有加android:contentDescription=”@string/app_name”時會引起Missing contentDescription attribute on image.
主要是因爲在main.xml中沒有使用TextView之類的文本控件,ADT會提示給像ImageView增加一個說明,這裏添加android:contentDescription=”@string/app_name即可,其實加不加影響不大。只是在IDE中會顯示一個黃色下劃線,不美觀。