最近项目需要新手指导功能,为了图省事Viewpager使用了fragment。因为展示的UI大同小异,所以重载了Fragment的构造方法,这就出事了。
java.lang.RuntimeException:
Unable to start activity ComponentInfo{ctrip.pad.view/ctrip.pad.splash.NewFunctionIntroduceActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment ctrip.pad.splash.b: make sure class name exists, is public, and has an empty constructor that is public
看一下官方文档的描述:
Default constructor. Every fragment must have an empty constructor, so