Android报错MainActivity is not an enclosing class
来源:互联网 发布:淘宝网电脑版登陆网址 编辑:程序博客网 时间:2024/06/05 12:43
错误:
我在从我的子类activity跳转到我的mainActivity的时候,然后就一直报错:
MainActivity is not an enclosing class。后来百度下,有些人说
可能一:
Android Studio:xxx is not an enclosing class 错误的解决方法
这个问题一般出现在内部类中,若要创建内部类的实例,需要有外部类的实例才行,或者是将内部类设置为静态的,添加 static 关键字
可能二:
不过我的错误不是这个,我的错误是自己眼没看清你猜你看到了啥,
你看错误是啥想死的心都有了,我把
MainActivity.class写错成了MainActivity.this。
好的,再见,错误解决。
阅读全文
0 0
- Android报错MainActivity is not an enclosing class
- class xxx is not an enclosing class
- Android Studio:xxx is not an enclosing class
- Android Studio:xxx is not an enclosing class 错误的解决方法
- Java错误提示is not an enclosing class
- 创建java类中类出现is not an enclosing class
- intent时提示is not an enclosing class
- 创建java类中类出现is not an enclosing class
- 创建java类中类出现is not an enclosing class
- 创建java类中类出现is not an enclosing class
- 创建java类中类出现is not an enclosing class
- 报错:object is not an instance of declaring class
- mybatis报错:Could not instantiate bean class [Dao.stuDao]: Specified class is an interface
- Java报错No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Java 报错No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- springMVC接受list报错:Could not instantiate bean class [java.util.List]: Specified class is an interf
- mybatis 报错 Specified class is an interface
- java编译报错No enclosing instance of type initial is accessible. Must qualify the allocation with an enc
- kettle错误:The driver has not received any packets from the server
- PPT压缩软件(PPTMinimizer) v4.0 中文注册版
- Spring Cloud构建微服务架构:Hystrix监控数据聚合
- Tools_NoribenSandbox
- HTML5知识总结
- Android报错MainActivity is not an enclosing class
- SpringMVC框架
- Top 10 Best Practices for Jenkins Pipeline Plugin
- JQuery中append()和after()的区别?
- 15个Android通用流行框架大全
- 解决“org.apache.hadoop.security.AccessControlException”
- Linux Device Model
- oracle-将另外一张表的列更新到本表的列
- zookeeper基本操作