错误:无法在片段中找到符号变量会话

时间:2019-10-26 04:05:49

标签: java android

我收到此错误

  

错误:找不到符号变量会话

    public class MisDatosFragment extends Fragment {
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View root = inflater.inflate(R.layout.fragment_misdatos, container, false);
        WebView webView = (WebView)root.findViewById(R.id.webkit);

        session = new SessionHandler(getActivity().getApplicationContext());
        User user = session.getUserDetails();

        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl("http://domain/miperfil.php?id_usuario="+user.getFullName()+"&id_codigo="+user.getFullName());
        return root;
    }
}

找不到符号变量会话

在这里;

session = new SessionHandler(getActivity().getApplicationContext());
User user = session.getUserDetails();

0 个答案:

没有答案