无法解析符号 R,Android Studio 中的 gen 文件夹在哪里? [英] Cannot resolve Symbol R, where is gen folder in Android Studio?

查看:76
本文介绍了无法解析符号 R,Android Studio 中的 gen 文件夹在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Android Studio 中创建了一个虚拟的 Android 项目,我可以让它运行,但编辑器本身无法找到 R 类.事实上,我找不到 gen 文件夹.我想也许应该将该文件夹添加为源文件夹或类依赖项,但我找不到它.

I have created a dummy Android project from within Android studio, and I can make it run, but the Editor itself fails to find the R class. In fact I can't find the gen folder. I thought that maybe that folder should be added as a source folder or a classes dependency, but I just can't find it.

有人可以帮忙吗?

推荐答案

@joe_deniable 给了我在 build 文件夹中仔细查看的想法,我发现了一个被 intellij 排除 的文件夹,在那里我的 R 很高兴地吃着冰淇淋.这是在这里:

@joe_deniable gave me the idea to look closer in the build folder, and I found a folder that had been excluded by intellij, where my R was happily having an ice cream. This was here:

构建/源代码/辅助/调试

build/source/aidl/debug

我必须从排除列表中删除此文件夹并将其添加到源中,然后终于可以在这个新的 IDE 中开始编码了.

I had to remove this folder from the exclusion list and add it to the sources, and could finally start coding in this new IDE.

谢谢

这篇关于无法解析符号 R,Android Studio 中的 gen 文件夹在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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