首页 > 移动平台 > 详细

android No enclosing instance of type BasicActivity is accessible. Must qualify the allocation with

时间:2015-08-15 20:07:07      阅读:285      评论:0      收藏:0      [点我收藏+]

No enclosing instance of type BasicActivity is accessible. Must qualify the allocation with an enclosing instance of type BasicActivity (e.g. x.new A() where x is an instance of BasicActivity).


描述:

BasicActivity.java中写了一个public class 的内部类,在另一个java文件中引用,自动编译出现如上提示。


解决方法:

把内部类public class改成public static class就可以了。


如下图:

技术分享

技术分享


参考:

http://blog.csdn.net/sunny2038/article/details/6926079

版权声明:本文为博主原创文章,未经博主允许不得转载。

android No enclosing instance of type BasicActivity is accessible. Must qualify the allocation with

原文:http://blog.csdn.net/wwzqj/article/details/47684067

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!