Binary XML file line #0: Error inflating class

前端 未结 2 1048
粉色の甜心
粉色の甜心 2020-12-11 16:33

I have error running a quiz game. Something like this (when open gameactivity). My application stop and I ge Binary XML file error on line #0. It`s kinda weird, becouse I di

2条回答
  •  再見小時候
    2020-12-11 17:10

    The problem comes with the library itself, If you check attrs.xml:

    
    

    As you can see the buttonColor only accepts color value, NOT color reference, and the view is trying to convert reference value you pass in xml to color and it throws an exception, So you can only use color for this attribute ( like this: #000000) Or fork the project and modify attrs.xml like this:

    
    

提交回复
热议问题