使用getview(),因为这个方法最终会返回当前fragment的根视图

Button btn = (Button) getView().findViewById(R.id.btn);

运行竟然报空指针,解决使用ButterKnife找id