Android application crushes when I use xml file as icon



  • Hello, I have floating action button. When I want to use the xml file that got from the svg filea as a badge, the annex closes, in the loga will write Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_add.xml from drawable resource ID #0x7f02004d. Help me find out what the problem is.



  • The problem was in the Androids 5- the solution was to add gradle-e vectorDrawables.useSupportLibrary, and in the place android:src = "@drawable/ic_add write app:srcCompat = "@drawabel/ic_add."




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2