android.content.res.Resources$NotFoundException for ic_sync_black_24dp.xml

前端 未结 3 1666
栀梦
栀梦 2021-01-11 12:42

I\'ve struggled with this for over a week, because I figure it has to be something with my environment, but I can\'t narrow it down.

I start an empty project, add a

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-11 13:13

    Seems that the issue lay with API 21, the 24.0dp that was mentioned did not solve the issue for me instead I was receiving:

    E/PathParser: error in parsing "c-3.31 0,-6,-2.69,-6,-6 0,-1.01.25,-1.97.7,-2.8"
    

    I found the answer at https://github.com/google/material-design-icons/issues/225

    It turns out the pathData is invalid cannot be parsed in API 21 properly (the problem does not exist in API 22 or 23). Simply replace the pathData with:

    android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-.25 1.97,-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01 .25,-1.97 .7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z"
    

提交回复
热议问题