原因:fragment多次添加
解决方法:
在对应的xmlt中添加tool:context,必须对应fragment名
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
//添加此行
tools:context="com.example.routermanager.frame.MessageFrame">