标签:
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