-1

I'm learning how to make android apps from book: "Android Programming for beginners" by John Horton. In chapter 12 I downloaded images and copied it to res directory as shown in the book. But there are some errors when I tried to sync gradle files. I think the directory structure was changed since the book was written. Can anyone point me to a resource where I can learn how to put resources in res directory?

PS: I'm using android studio.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
siddhesh
  • 1
  • 3
  • What are these errors when you tried to sync gradle files? – Oğuzhan Döngül May 12 '18 at 11:26
  • @OğuzhanDöngül Caused by: org.gradle.api.GradleException: Can't process attribute android:fillColor="@android:color/white": references to other resources are not supported by build-time PNG generation. See http://developer.android.com/tools/help/vector-asset-studio.html for details. – siddhesh May 12 '18 at 11:30
  • When you get an error or exception, first google it. Most probably someone else had this error before you, many times. See this question and answers. It may help: https://stackoverflow.com/q/32924986/3669559 – Oğuzhan Döngül May 12 '18 at 12:10
  • @OğuzhanDöngül that does not solve my question. I tried googleing but it did not help. – siddhesh May 12 '18 at 13:02

1 Answers1

0

You have to create "drawable" folder inside /res folder for images.

Some other folders can have in the /res folder:

  1. drawable/ - Bitmap files / Nine-Patches (re-sizable bitmaps) / State lists / Shapes / Animation drawables / Other drawables
  2. layout/ - XML files that define a user interface layout.
  • That folder was already present in the resources I downloaded from https://material.io/tools/icons/?style=baseline . There were some additional folders and xml files. None of which are working. – siddhesh May 12 '18 at 11:47
  • In which format you have downloaded image... PNG or other..? – Gaurav Jain May 12 '18 at 11:56