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

后端 未结 30 1942
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 13:48

I am receiving many errors of kind displayed in the subj. These errors seems to be occasional and I cannot reproduce them. From stack I can learn that such error may occurs

相关标签:
30条回答
  • 2020-11-22 14:40

    This link may help you. Try checking in your manifest for problems. If you can get it to happen again, post your entire stack trace so that we can see what the error actually is.

    EDIT: I'm sure you've checked this, but what is on line 12 of the XML file you use for the TourActivity layout?

    0 讨论(0)
  • 2020-11-22 14:41

    ViewFlipper loads all images into memory during layout inflating. Because my images are big it takes many memory, I replaced ViewFlipper with ImageSwitcher which can change the images with animation like ViewFlipper but it loads only one image at the time.

    0 讨论(0)
  • 2020-11-22 14:41

    In my case I've to specify the complete package name of library UI component that I use in my layout file.

    0 讨论(0)
  • 2020-11-22 14:42

    In my case,this error happen when I use the Floating action button and set android:backgroundTint="#000". Then just don't set backgroundTint and problem solved. Hope it's helpful for you.

    0 讨论(0)
  • 2020-11-22 14:43

    I had this error because i selected theme as Material theme. But as i was trying to run app on 4.4.2 it gave this error.

    Solution : Select Theme_holo as theme

    0 讨论(0)
  • 2020-11-22 14:43
    • I just solve this issue just delete your images from drawable(v24) and just paste it in drawable folder this works for me.

    0 讨论(0)
提交回复
热议问题