错误提示:
No enclosing instance of type UpdataInfoParser is accessible. Must qualify the allocation with an enclosing instance of type UpdataInfoParser
(e.g. x.new A() where x is an instance of UpdataInfoParser).
解决方法:
静态方法只能调用静态内部类。
public class UpdataInfo前加上static。
public class UpdataInfoParser
{
public static UpdataInfo getUpdataInfo(InputStream is) throws Exception
{
UpdataInfo info = new UpdataInfo();
}
public class UpdataInfo
{
}
}