Hello, I have a floating action button. When I want to use the xml file that I received from the svg file as an icon, the application closes, writes Caused by: android.content.res.Resources $ NotFoundException: File res / drawable / ic_add.xml from drawable resource ID # 0x7f02004d in the log. Help find out what the problem is

  • Try to make a clean project. - Yuriy SPb
  • did, but did not help - Varuzhan Stepanyan
  • Show how the unlisted file looks like - Yuriy SPb
  • Also try using versions of 23.3.0 instead of 24+ - JuriySPb

1 answer 1

The problem was in androids 5-, for the solution you need in gradle - e add vectorDrawables.useSupportLibrary, and in the place of android: src = "@ drawable / ic_add write app: srcCompat =" @ drawabel / ic_add "