No enclosing instance of the type RegisterActivity is accessible

来源:互联网 发布:淘宝假货改进 编辑:程序博客网 时间:2024/05/18 11:00

【问题描述】

在RegisterFragment中需要跳转到ChoseCountryActivity。

intent.setClass(RegisterActivity.this, ChoseCountryActivity.class);

错误提示:No enclosing instance of the type RegisterActivity is accessible


【解决方法】

intent.setClass(getActivity(), ChoseCountryActivity.class);

0 0
原创粉丝点击