R.java中没有得到与IntelliJ IDEA的12产生 [英] R.java not getting generated with Intellij Idea 12

查看:210
本文介绍了R.java中没有得到与IntelliJ IDEA的12产生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是全新的Andr​​oid开发,我使用IntelliJ IDEA的12个工作。 一切都设置正确,但是有一个问题,我面对的是,我的根文件夹中的R.java文件不具有code本来应该there.I认为这code应该已经自动生成的,但它不是present那里。 下面是有关我的项目结构看起来像上的链接:

I am brand new to android development and i am working with IntelliJ Idea 12. Everything is set up correctly but one problem i am facing is that my R.java file inside gen folder does not have the code that should have been there.I think this code should have been auto generated but it's not present there. Here are the links on on what my project structure looks like:

我无法发布超过两个环节,所以这里是链接到画廊: http://postimage.org/gallery/19189wei/

I could not post more than two links, so here is the link to gallery: http://postimage.org/gallery/19189wei/

它包含了我的string.xml,main.xml中,R.java,HaikuDisplay.java 所以我想知道在哪里的问题?

It contains my string.xml , main.xml , R.java , HaikuDisplay.java So i wanted to know where's the problem?

推荐答案

我也有同样的问题与想法12(并有在构思11没有这样的问题)。要解决它,你可能需要检查以下内容:

I have the same problem with idea 12 (and there were no such problem in idea 11). To fix it you may need to check the following:

  • 开启模块设置(F4)/项目名/模块SDK设置为安卓[版本]
  • 文件夹'根'存在于项目的根目录,并设置为SRC(其实就可以了,将是空的,但我无法弄清楚,为什么它不能没有它的工作。)
  • 更新AndroidManifest.xml中(只是某个地方加入空间和保存)。
  • 如果想法仍无法找到任何您的ID或字符串 - 试图通过一个打开一个,空间更新时间:)

在这个想法会发现,有很多XML的布局文件夹中,并会知道所有的IDS,XML,并串。

After that idea will find, that there is many xml's in layout folder, and will know about all ids, xmls and strings.

但R.java文件仍将是空的,根文件夹将不包含任何更多的则空BuildConfig.java文件,不会有其他的R.java文件,它包含了所有这个常量。

But R.java file will still be empty, gen folder will not contain anything more then empty BuildConfig.java file, and there will be no other R.java files, that contains all this constants.

它看起来像12的想法,而不是想法11存储在项目文件夹(.idea)及其产生的R.java常量,如果你正在使用的pom.xml作为项目的描述 - 你需要检查这一切点后再次重装pom.xml文件。

It looks like idea 12 as opposed to idea 11 store its generated R.java constants in project folder (.idea), and if you are using 'pom.xml' as project description - you will need to check all this points again after reloading pom.xml file.

这篇关于R.java中没有得到与IntelliJ IDEA的12产生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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