@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view= Inflater.inflate(R.layout.reg_book,container,false);
return view;
}
上下文:我是 android 的新手,我遇到了“无法从静态上下文引用非静态方法”的错误。错误显示在“.inflate”。
最佳答案
改变这一行
view= Inflater.inflate(R.layout.reg_book,container,false);
到
view= inflater.inflate(R.layout.reg_book,container,false);
关于java - 无法从静态上下文中引用非静态方法 'inflate(byte[],int,int)',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44025580/