Fragment初始化的问题
07-23 15:09:24.730: E/AndroidRuntime(27782): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.cloud.weidao.MainActivity: make sure class name exists, is public, and has an empty constructor that is public
请问怎么解决
07-23 15:09:24.730: E/AndroidRuntime(27782): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.cloud.weidao.MainActivity: make sure class name exists, is public, and has an empty constructor that is public
请问怎么解决
这是APIDemos中关于fragment的代码。你看看class节点是否正确?
<fragment
android:id="@+id/titles"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.uestc.fragment.FragmentLayout$TitlesFragment" />