0

I see in a project android:src="@drawable/new_logo"/> but I can not see where this new_logo is defined. By googling I see this pattern in other examples e.g. add image to toast in the accepted answer.
What is this new_logo? I tried to copy paste this to a new project but I get:

error: Error: No resource found that matches the given name (at 'src' with value '@drawable/ new_logo').

Also:

Failed to convert @drawable/new_logo into a drawable

Why it hits an error? I tried to grep the files of the project that seems to work but I could not find a file new_logo but there is no error at that code.

Community
  • 1
  • 1
Jim
  • 18,826
  • 34
  • 135
  • 254

1 Answers1

1

I see in a project android:src="@drawable/new_logo"/> but I can not see where this new_logo is defined.

It will be a file in either a res/drawable.../ directory or a res/mipmap.../ directory in your project. Probably the file is a PNG file, though it could be something else.

Why it hits an error?

Because you do not have a drawable resource with that name.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491