FLAG_NEEDS_MENU_KEY cannot be resolved or is not a field 报错,程序无法运行
来源:互联网 发布:拦截wifi的软件 编辑:程序博客网 时间:2024/04/30 02:45
把getWindow().setFlags(WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY,
WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY);这句话 换成
try {
getWindow().addFlags(WindowManager.LayoutParams.class.getField("FLAG_NEEDS_MENU_KEY").getInt(null));
}catch (NoSuchFieldException e) {
// Ignore since this field won't exist in most versions of Android
}catch (IllegalAccessException e) {
Log.w("feelyou.info", "Could not access FLAG_NEEDS_MENU_KEY in addLegacyOverflowButton()", e);
}
就ok了 ,亲测。
0 0
- FLAG_NEEDS_MENU_KEY cannot be resolved or is not a field 报错,程序无法运行
- 报出现“"cannot be resolved or is not a field",
- Android工程中加入图片,报错cannot be resolved or is not a field
- Androidannotation 报错:cannot be resolved or is not a field
- Android工程中加入图片,报错cannot be resolved or is not a field
- R.xml.preference报错:preference cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- layout cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- (Layout) cannot be resolved or is not a field 错误
- main cannot be resolved or is not a field
- button1 cannot be resolved or is not a field
- "cannot be resolved or is not a field"问题解决
- main cannot be resolved or is not a field错误
- R.xxx cannot be resolved or is not a field
- 开启FTP服务器(编程)
- C语言数组的应用
- 使用Excel进行多元回归分析
- java Object
- 单链表的逆转问题
- FLAG_NEEDS_MENU_KEY cannot be resolved or is not a field 报错,程序无法运行
- Codevs 1337 银行里的迷宫
- 浅谈栈帧
- C# winform ComboBox绑定数据源时触发SelectedIndexChanged事件的处理
- 剑指offer(四十九)之二叉树中和为某一值的路径
- Codevs 1065 01字符串
- protobuf vs2015编译
- MongoDB简介
- c语言中如何判断文件是否存在