错误建设项目在Android的工作室"错误:未发现的资源匹配给定名称(含价值为____“@绘制/<名称>”)错误、名称、建设项目、工作室

2023-09-05 10:28:33 作者:牵魂梦几遍

我已经找遍了谷歌,计算器和其他Android程序的网站,很多对谁遗失的文件从一个文件夹到另一个等..人但没有,说明我所面临的问题的建议。

I've searched all over Google, stackoverflow and other android programming websites, many have suggestions for people who have misplaced files from one folder to another and so forth.. But none that illustrate the problem I'm facing.

这不是一个损坏的文件的情况下here因为我想这没有成功。

It's not a corrupt file as in the case here as I tried this with no success.

我要面对的错误是相似,但:

The error I'm facing is similar though:

[debug] C:\Users\Name\AppData\Local\Temp\android_manifest_copy6264790980678653632tmp\AndroidManifest.xml:11: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').

类似地,这是发生带@string元件,@style元件和另一个@string,下面的例子:

Similarly, this is happening with an @string element, @style element and another @string, examples below:

'@string/app_name'
'@style/AppTheme'
'@string/app_name'

这是我已经注意到了,从Eclipse的世界的到来,我无法解释这种现象在Android的工作室。在我的'主'的项目文件夹,一切都存在,并建立正确的调试一件事。看来,Android的工作室正在试图构建一种调试文件夹,运行构建时将不能建立>重建工程。

One thing that I have noticed, and coming from the world of Eclipse, I cannot explain this behavior in Android Studio.. In my 'main' project folder, everything exists and builds correctly for debugging. It seems that Android Studio is trying to build off of a 'debug' folder, which will not build when running 'Build' > 'Rebuild Project'.

有谁知道在哪里我可以把这些丢失的文件拿到项目建设?或者,这是一些其他的问题?

Does anyone know where I can place these missing files to get the project to build? Or is this some other problem?

请让我知道如果我需要提供更多的细节 - 这是我对计算器的第一篇文章,虽然,我经常读

Please let me know if I need to provide more detail - this is my first post on stackoverflow, though, I am a frequent reader.

感谢。

推荐答案

好了,所以用大惊小怪重建后几个小时尝试不同的方法(重命名特定文件[即那些有问题],重命名里面的文件夹后重建应用程序建立文件夹等),我终于下定决心,我会去到问题的根源,看看它的工作像其他的IDE。事实上也如此,这是我进行的修正:

Alright, so after fussing with the rebuild for hours trying different methods (renaming particular files [i.e. those with the problems], rebuilding the app after renaming folders inside the build folder, etc) I finally decided that I would go to the source of the problem and see if it worked like other IDE's. Indeed it did, this is how I performed the fix:

找到了问题的位置 - 对于我来说,所有四个我是该项目的建设文件夹中的错误。 关闭项目的任何打开的实例 当项目关闭,(如果使用的是不同的操作系统您选择或其他)重命名该文件夹从Windows资源管理器(即如果该文件夹的名称是建,将其重命名为build.old) 打开项目再次 转到构建>重建项目

您不应该有这样做的任何问题,像我一样。

You should not have any issues doing this, like I did.

说明:

在IDE平台:Android的工作室 在IDE版本:Android的工作室(I / O preVIEW)0.2.2 JRE:1.7.0_25