第一次使用mvvm+fragment找不到 FragmentMineInfoBinding

一直找不到FragmentMineInfoBinding的原因是因为fragment_mine_info.xml 里一个@+id都没有加

原来布局:

<?xml version="1.0" encoding="utf-8"?>

<layout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    >

        android:layout_width="match_parent"

        android:layout_height="match_parent">

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:text="test"

        />

</layout>




修改后的布局

<?xml version="1.0" encoding="utf-8"?>

<layout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    >

        android:layout_width="match_parent"

        android:layout_height="match_parent">

        android:id="@+id/test"

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:text="test"

        />

</layout>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容