Enryu
Enryu

Reputation: 1424

Android Studio No resource found @drawable

I have been following the developer tutorial from the official android Udacity course and they have exercises where you work on projects they have uploaded to github.

All of their projects I have worked on so far have gone smoothly. Unfortunately, the latest project (and a lot of projects after this project) have the same dependency errors and soon as I open them. All the errors seem to be looking for a resource in a drawable folder. I realize I don't have a drawable folder under my resources, but I feel this could be a problem due to the fact that I am lacking the correct hidden resource files (if that is possible, i am still new to android development).

Another possibility is that version of android studio and my sdk's are a newer version than the project was originally created with which means the resource calls could be outdated.

I realize that several of the resource calls seem to have to do with the holo theme which has caused me problems in the past.

Errors

Directories

Here is a link to some of the resource calls http://puu.sh/sKafe/d0a2fd7126.png

My compiled and target sdk version is 25 SDK

Here is the github for the project exercise I am attempting to do https://github.com/udacity/ud851-Exercises/tree/student/Lesson02-GitHub-Repo-Search/T02.04-Exercise-ConnectingToTheInternet

Upvotes: 0

Views: 1197

Answers (2)

Enryu
Enryu

Reputation: 1424

I found out what was causing the problem. I re-cloned the GitHub, but this time I ran the project from the downloads folder and it worked fine. I found out that the first time i downloaded the zip folder with the project, I unzipped it and then moved it to another directory where I keep my android projects. When I moved the project folder to the new directory, the file directory names became longer and some particular files names became longer than the character limit for the windows file naming system. I was then prompted to skip those particular files which I must have selected yes, which caused the missing dependency issues.

Upvotes: 1

Binil
Binil

Reputation: 454

you don't have the drawable directory,create one

right click on the res directory,

res -> New -> Directory

enter image description here

Enter the Directory Name as drawable -> ok

enter image description here

add the drawble file in that.thats all.

Upvotes: 0

Related Questions