Android XML: RuntimeException: Failed to resolve attribute at index 6

后端 未结 10 1899
梦如初夏
梦如初夏 2020-12-01 23:44

Hello dear stackoverflower,

In my project, i am using the new \"android design library\". The problem is, that there is a runtime exception which says(Im trying to c

10条回答
  •  攒了一身酷
    2020-12-01 23:48

    You can solved this problem by using Theme.AppCompat.Light as your activity's parent theme. add: The reason is that one of the default style using inner in FloatingActionButton is declare like this: the backgroundTint is refer to another attribute colorAccent which should be measure declared in our theme, otherwise, the exception might be throw. But colorAccent is declared in AppCompat Theme and did not declared in the sdk default Theme.To measure that we can using the design lib correctly in running, one of the easy way is to measure the using of AppCompat Theme like Theme.AppCompat.Light.

提交回复
热议问题