Fragment MyFragment not attached to Activity
2015-05-24 08:45
309 查看
3 down vote | I faced the same problem i just add the singletone instance to get resource as referred by ErickMainFragmentActivity.defaultInstance().getResources().getString(R.string.app_name); you can also use getActivity().getResources().getString(R.string.app_name); I hope this will help. |
相关文章推荐
- 报错:由getResources()引起的:Fragment MyFragment not attached to Activity
- Fragment MyFragment not attached to Activity
- Android bug Fragment MyFragment not attached to Activity
- Fragment not attached to Activity
- Fragment抛出java.lang.IllegalStateException: Fragment not attached to Activity
- Android Fragment IllegalStateException: Fragment not attached to Activity
- Fragment " + this + " not attached to Activity 异常解决
- Fragment not attached to Activity 异常
- Fragment not attached to Activity 异常
- Android IllegalStateException: Fragment not attached to Activity
- java.lang.IllegalStateException: Fragment not attached to Activity异常的一个场景
- Fragment not attached to Activity 异常
- Fragment not attached to Activity 异常
- Android Fragment异常java.lang.IllegalStateException: Fragment not attached to Activity
- 我的android异常系列——Fragment XXX not attached to Activity
- 关于Fragment not attached to Activity 异常
- java.lang.IllegalStateException: Fragment ... not attached to Activity
- 问题解决:Fragment not attached to Activity
- Fragment not attached to Activity
- 关于Fragment(XXFragment) not attached to Activity 异常