jar包冲突解决了,40017(不合法的按钮个数)来了
周一好不容易i解决了jar包冲突问题,40017出现了,这是个什么鬼
我的代码都是按照视频上敲出来的。求达人解释
票据:y8nB8Eii8Qa4qRhJw-9JUnqngZ7e8Db6ECq5lN01ksEyzJO9_3rMBJVQ8XTmefGSZLm48eY7BDPT_h_3ZM-N_nSJqHw_bpCfdDy697SYOrA 有效时间:7200 menu:{"button":[{"key":"11","name":"click菜单","sub_btn":[],"type":"click"},{"name":"view菜单","sub_btn":[],"type":"view","url":"http://www.imooc.com"},{"name":"菜单","sub_btn":[{"key":"31","name":"扫码事件","sub_btn":[],"type":"scancode_push"},{"key":"32","name":"地理位置","sub_btn":[],"type":"location_select"}],"type":""}]} 创建菜单失败!40017
菜单组装代码如下:
public static Menu initMenu(){ Menu menu = new Menu(); ClickButton button11 = new ClickButton(); button11.setName("click菜单"); button11.setType("click"); button11.setKey("11"); ViewButton button21 = new ViewButton(); button21.setName("view菜单"); button21.setType("view"); button21.setUrl("http://www.imooc.com"); ClickButton button31 = new ClickButton(); button31.setName("扫码事件"); button31.setType("scancode_push"); button31.setKey("31"); ClickButton button32 = new ClickButton(); button32.setName("地理位置"); button32.setType("location_select"); button32.setKey("32"); Button button = new Button(); button.setName("菜单"); button.setSub_btn(new Button[]{button31,button32}); menu.setButton(new Button[]{button11,button21,button}); return menu; }