Eclipse的"无效的资源目录名称和QUOT; [英] Eclipse "invalid resource directory name"

查看:251
本文介绍了Eclipse的"无效的资源目录名称和QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直停留在这个过去好几天了。

I've been stuck on this for the past several days.

每当我试图将一个资源文件夹添加到我在Eclipse中的Andr​​oid项目(3.7.0),我总是得到以下错误:

Whenever I try to add a resource folder to my Android project in Eclipse (3.7.0), I always get the following error:

invalid resource directory name: C:\path_to_project\res/new_folder_name

您会注意到斜杠去了错误的方式为新创建的文件夹,所以我猜这是某种特定于Windows的问题,虽然我不能为我的生活弄清楚如何解决吧。

You'll notice that the slash goes the wrong way for the newly created folder, so I'm guessing this is some sort of Windows-specific issue, though I can't for the life of me figure out how to resolve it.

下面是一些我尝试创建该文件夹的方式:

Here's some of the ways I tried creating the folder:

  • 右键点击资源项目在Eclipse - >新建 - >文件夹
  • 在通过Windows资源管理器中创建新的文件夹并将其导入Eclipse项目
  • 从我的工作空间中删除该项目完全,请在资源管理器中的文件夹,并重新导入整个项目到Eclipse
  • 使用命令行做同样的,无论是Cygwin和DOS

在所有这些情况下,我最终斜线走错路。

In all of these cases, I end up with the slash going the wrong way.

我在想什么?

推荐答案

在RES-文件夹文件夹是只允许那些由Android的定义,例如绘制。请参阅<一href="http://developer.android.com/guide/topics/resources/available-resources.html">http://developer.android.com/guide/topics/resources/available-resources.html了解更多信息。如果您选择任何其他建设项目,当你得到错误无效的资源目录名称。

Folders in the res-Folder are only allowed to be those defined by Android, for example "drawable". See http://developer.android.com/guide/topics/resources/available-resources.html for more information. If you choose anything else you get the error "invalid resource directory name" when building your project.

这篇关于Eclipse的&QUOT;无效的资源目录名称和QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆