android.view.InflateException: Binary XML file line #10: Error inflating class fragment

前端 未结 4 893
我寻月下人不归
我寻月下人不归 2021-01-06 02:30

I created an app by following the tutorial at http://www.techotopia.com/index.php/Using_Fragments_in_Android_-_A_Worked_Example, but I have a error.

LogCat:<

4条回答
  •  青春惊慌失措
    2021-01-06 03:04

    I am also new to Android and encountered the same error today. I could not find a solution that worked for me but one thing was clear to me that this issue occurs when android is not able to resolve a mandatory attribute of one of the elements in layout xml.

    So I checked my layout thoroughly and found that by mistake I created an ID

    in ids.xml. This Id was conflicting with attribute

    android:imeActionId="@+id/login"

    of EditText element.

    Hope this helps someone.

提交回复
热议问题