No resource identifier found for attribute 'showAsAction' in package 'android'

前端 未结 7 1907
花落未央
花落未央 2021-02-13 19:30

as the title suggest, I\'m getting that error in at least 3 of the XML layout files, however, I dont see the attritube \"showsAsAction\" in any of those XML files, did I miss so

7条回答
  •  星月不相逢
    2021-02-13 19:56

    Are you sure you are looking in the right *.xml file? You seem to look for "showAsAction" in layout xmls, but it's parameter for the menu. Look rather into .../menu/your_activity.xml

    The problem you are dealing with is connected with using target less than 4.0 and/or API less than 14.

    So,

    a) change those parameters,

    b) change the value of showAsAction from "never" to "ifRoom".

提交回复
热议问题