NavHostFragment not accessible from XML

前端 未结 6 1594
天涯浪人
天涯浪人 2021-02-14 06:08

I wanted to try new Navigation library. After following this guideline I experienced error at runtime:

Caused by: android.view.InflateException: Binary XML file          


        
6条回答
  •  旧巷少年郎
    2021-02-14 06:47

    Under the navigation folder, there is an XML file called nav_graph.xml. Open it and it will prompt Gradle sync.

    Project Tree

提交回复
热议问题