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

前端 未结 4 1799
既然无缘
既然无缘 2020-12-01 16:18

I am developing a simple app. Just finished the home screen. If the orientation changes more than two times, it is throwing the error and application is force closing.

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 16:39

    As the others clarified, part of a problem was an issue related to the background image I'd set for my layout. However, getting that solved, I persistently encountered the error:

    Unfortunately the application has stopped

    With trial and error, I found the problem was caused by the elements which after deleting them, I could eventually run the application.

提交回复
热议问题