Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 新活动崩溃';s调用OnCreate_Android_Xml - Fatal编程技术网

Android 新活动崩溃';s调用OnCreate

Android 新活动崩溃';s调用OnCreate,android,xml,Android,Xml,在启动名为Home Screen的活动时,应用程序在尝试读取第36行的XML文件时崩溃,错误如下: Binary XML file line #36: Error inflating class fragment <fragment android:name="com.example.myName.myApp.EventsFragment" android:id="@+id/events_frag" android:layout_width="ma

在启动名为Home Screen的活动时,应用程序在尝试读取第36行的XML文件时崩溃,错误如下:

    Binary XML file line #36: Error inflating class fragment

    <fragment
    android:name="com.example.myName.myApp.EventsFragment"
    android:id="@+id/events_frag"
    android:layout_width="match_parent"
    android:layout_height="464dp"
    android:layout_alignParentBottom="true"
    android:layout_alignParentStart="true" />

您需要在
主屏幕中实现
OnFragmentInteractionListener
。Java
活动。该侦听器实现丢失,导致崩溃

该日志明确说明:

Caused by: java.lang.RuntimeException: com.example.braedanshigley.feelbettertogether.HomeScreen@d0dbff6 must implement OnFragmentInteractionListener

您好,您的片段名称包正确吗?
com.example.myName.myApp.events片段此片段必须是片段类顶部的片段

您可以发布崩溃堆栈跟踪吗?@shhp已添加!非常感谢你费心去看。非常感谢!现在我觉得不仔细看很傻:P
Caused by: java.lang.RuntimeException: com.example.braedanshigley.feelbettertogether.HomeScreen@d0dbff6 must implement OnFragmentInteractionListener