AndroidStudio:x.Ext.init(this);初始化时this报红(错)(171130
来源:互联网 发布:汽车金融软件 编辑:程序博客网 时间:2024/05/27 02:32
x.Ext.init(this);
原因:
当前类没有继承Application类
解决办法:
1,使当前类继承Application类。(需要修改部分代码,详参下)
2,新建一个类替换。
解决步骤:
1,备份代码,删除当前类;
2,新建一个类,继承于Application。
3,恢复代码。
详情:
看视频,新建了一个类,好像是直接建的,和视频上不一样。
所以导致this报红。
should be choice(其实应该选择) extends Application
这个类不能设置布局文件!
AndroidManifest.xml里也不能注册(下面报红请忽略)
改好了AndroidManifest.xml里是这样的,输入文件名后有提示。
阅读全文
0 0
- AndroidStudio:x.Ext.init(this);初始化时this报红(错)(171130
- 解决Android端融云无法初始化(程序一运行就崩溃),定位在RongIM.init(this);
- this.onMetaChange is undefined和Ext.Container.LAYOUTS[this.layout.toLowerCase()] is not a constructor报错
- Ext 留住this
- Maven: mvn -X 执行报错:No goals have been specified for this build.
- 使用navicat连接mysql 报错:1130-Host ‘192.168.X.X’ is not allowed to connent to this mysql server
- ASSERT(AfxGetThread() == this); 报错
- Multiple markers at this line报错
- this
- this
- this
- this
- this
- this
- this
- this
- this
- this
- COMP2907 W1 稳定匹配
- HDOJ2132 An easy problem
- DIY激光竖琴
- WEB-INF目录与META-INF目录的作用
- 1075. 链表元素分类(25)
- AndroidStudio:x.Ext.init(this);初始化时this报红(错)(171130
- 二、开始Tango API(Unity版)
- zynq 7000 自定义IP 实验
- 浏览器 history location pushstate的解决疑问
- 10分钟让你明白MySQL是如何利用索引的
- 数据结构实验之图论五:从起始点到目标点的最短步数(BFS)
- JQ传统轮播图
- 服务器安装系统
- linux基础命令