[英]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. 我一直在遵循官方android Udacity课程中的开发人员教程,并且他们在练习中处理了已上传到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).
我意识到我的资源下没有可绘制的文件夹,但是由于我缺少正确的隐藏资源文件(如果可能的话,我仍然是Android开发的新手),因此我认为这可能是个问题。
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. 另一个可能性是android studio版本和我的sdk版本比最初创建的项目要新,这意味着资源调用可能已过时。
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. 我意识到,一些资源调用似乎与过去曾引起我麻烦的全息主题有关。
Here is a link to some of the resource calls http://puu.sh/sKafe/d0a2fd7126.png 这是一些资源调用的链接http://puu.sh/sKafe/d0a2fd7126.png
My compiled and target sdk version is 25 我的编译和目标SDK版本是25
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 这是我正在尝试进行的项目练习的github https://github.com/udacity/ud851-Exercises/tree/student/Lesson02-GitHub-Repo-Search/T02.04-Exercise-ConnectingToTheInternet
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.
我重新克隆了GitHub,但是这次我从downloads文件夹运行了该项目,并且运行良好。 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.
我发现第一次下载带有项目的zip文件夹时,我将其解压缩,然后将其移动到另一个目录中,该目录中存放了我的android项目。 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.
当我将项目文件夹移动到新目录时,文件目录名变得更长,并且某些特定的文件名变得超过Windows文件命名系统的字符数限制。 I was then prompted to skip those particular files which I must have selected yes, which caused the missing dependency issues.
然后提示我跳过那些必须选择“是”的特定文件,这会导致缺少依赖项问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.