IntelliJ IDEA的 - 不能建造任何东西,总是与QUOT;包R不存在"不存在、东西、IntelliJ、IDEA

由网友(独步吟客)分享简介:我试图用IntelliJ IDEA的工作,在与同事的发誓它的Andr​​oid应用程序,但我无法建立任何他送我,因为每当我试图构建我得到一个错误的Andr​​oid项目话说包R不存在。I'm trying to use IntelliJ IDEA to work on an Android app with a co...

我试图用IntelliJ IDEA的工作,在与同事的发誓它的Andr​​oid应用程序,但我无法建立任何他送我,因为每当我试图构建我得到一个错误的Andr​​oid项目话说包R不存在

I'm trying to use IntelliJ IDEA to work on an Android app with a colleague that swears by it, but I'm unable to build any of the Android projects he sends me because whenever I try a build I get an error saying package R does not exist.

我一直在尝试一切我能想到的。实例和其他的事情需要注意的是:

I have been trying out everything I can think of. Examples and other things to note are:

确保我有一个版本的 local.properties 文件指着我的Andr​​oid软件开发工具包文件夹的根。

Making sure I have a version of the local.properties file pointing to the root of my Android SDKs folder.

在项目结构对话框中的各种设置东西(我就不一一列举)。

Fiddling with various settings in the project structure dialog (I won't list them all).

我工作的项目有两个库项目还使用了研究类,他们工作得很好。

The project I'm working on has two library projects with also use the R class and they work fine.

在IDE中的智能感知识别研究类,并提出了我期望的东西。

The intellisense within the IDE recognises the R class and comes up with the stuff I expect.

任何帮助将是很大的AP preciated。我觉得我失去了一些东西基本的。

Any help would be greatly appreciated. I feel I'm missing something basic.

推荐答案

我的品牌新来的IntelliJ因此,如果这不会为你工作,我表示歉意。我遇到同样的问题和解决方案是一个安卓 刻面添加到项目中。

I am brand new to IntelliJ so I apologize if this doesn't work for you. I was experiencing the same problem and the solution was to add an Android Facet to your project.

(我在Mac上,所以这里的方向可能会稍微偏离,并且有可能是更好的方法来找到这个窗口,如果是的话让我知道!)

(I am on a Mac, so directions here may be slightly off, and there are probably better ways to find this window, if so let me know!)

右键单击您的项目,并深入到打开模块设置(好像F4也适用) 选择刻面在最左边的列 单击+按钮 添加安卓 刻面到您的项目,瞧! 的您可能需要导入研究这会儿,这可能是一个巨大的痛苦......所以希望有人能附和一个简单的方法来自动-import 的 Right click your project and go down to Open Module Settings (seems F4 also works) Select Facets in the far left column Click the + button Add an Android Facet to your project, and VOILA! You may need to import your Rs now, which could be a huge pain... so hopefully someone can chime in with an easy way to auto-import

希望这可以帮助别人!

阅读全文

相关推荐

最新文章