Cannot reolve Symbol "@drawable/", image exists and application runs ok

Asked

Viewed 21 times

0

Android Studio shows this warning, but the application runs normal and the picture is shown normally.

My question is why the IDE shows the error if everything is ok.

Image in the folder:

Imagem existe na estrutura

Error in XML:

Erro no XML

Is there any place I should enter the file name?

1 answer

0


Rogerio, which version of Android Studio? Canary? what can happen sometimes is your app works because Android Studio has something cached that makes it work or as Voce says it’s all right, just the wrong message, sometimes it happens that the cache of Android Studio has something wrong. If Voce does a Build -> Clean Project and after it is finished does a Build -> Rebuild Project not solve? I would also try a File -> Invalidate cache / Restart. When I change branches a lot in git and there is a difference in dependency or Resource versions, sometimes mine gets problems that look like yours. I always use the latest Canary build so I expect some small problems like.

  • "File -> Invalidate cache / Restart" worked! Although it didn’t affect the application, I would always see what the error was and remember that "it was nothing". Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.