005.使用百度SDK写hello baidumap时,在布局xml文件中添加地图控件时;提示'clickable' attribute found, please also add

Posted nextfailure

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了005.使用百度SDK写hello baidumap时,在布局xml文件中添加地图控件时;提示'clickable' attribute found, please also add 相关的知识,希望对你有一定的参考价值。

0.报错&提示信息:

\'clickable\' attribute found, please also add \'focusable\'  A widget that is declared to be clickable but not declared to be focusable is not accessible via the keyboard. Please add the focusable attribute as well.

1.原因:

一个控件,如果没有定义focusable(可聚焦的),却定义了是clickable(可点击的),那么是不能通过键盘访问的。所以,需要添加一个focusable="true"。

2.解决方法:

切换到design试图,点击红框中的修复。如图:

 

以上是关于005.使用百度SDK写hello baidumap时,在布局xml文件中添加地图控件时;提示'clickable' attribute found, please also add 的主要内容,如果未能解决你的问题,请参考以下文章