异常信息:android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment xxx.fragments.XXXFragment: make sure class name exists, is public, and has an empty constructor that is public
场景:在使用Activity 和 Fragment共同使用时候;跳转出现的问题情况。
解决:
这种问题一般都是:XXXFragment的类中用的应该是public;但是有的是受保护的或者私有的 :导致的; 所以把这个类中的那些 改成:public ;然后在添加一个 构造就可以了:
如: public XXXFragment(){}