Caused by: android.view.InflateException: Binary XML file line #24: Binary XML file line #24: Error inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class fragment
Caused by: java.lang.IllegalArgumentException: Binary XML file line #24: Must specify unique android:id, android:tag, or have a parent with an id for xxx.xxxxx..XXXXFragment
原因是fragment在xml中使用没添加ID

加上ID即可

本文介绍了在Android开发中遇到的因Fragment未指定唯一ID而引发的InflateException错误,并提供了有效的解决方案。
1519

被折叠的 条评论
为什么被折叠?



