Android的工作室无法解决的R导入项目?工作室、项目、Android

2023-09-12 02:05:43 作者:猎枪

我想新的Andr​​oid工作室。我已经导出的项目在Eclipse中,使用构建摇篮选项。然后,我进口它在Android的工作室。根下的R.java文件有AJ在这一点红色圆圈。而在我的源文件,我得到无法解析符号R只要我有一个参照的资源,例如, R.layout.account_list等。

我以前从未使用过的IntelliJ。请问AP preciate任何帮助,因为显然没有很多的答案还没有关于Android工作室。谢谢!

解决方案 preSS F4成项目结构,检查软件开发工具包左 点击模块 - > 源代码标签,检查创和 SRC 作为源

PS:1年多的答案旧菜单已经改变。

I'm trying the new Android Studio. I've exported a project from eclipse, using the build gradle option. I've then imported it in Android Studio. The R.java file under gen has a j in a little red circle on it. And in my source files, I get "cannot resolve symbol R" wherever I have a reference to a resource, e.g. "R.layout.account_list" etc.

I have never used Intellij before. Would appreciate any help as there obviously aren't many answer yet about Android Studio. Thanks!

解决方案 android 导入工程 没有r文件,Android Studio 找不到R文件解决方法汇总 示例代码

Press F4 into Project Structure, Check SDKs on left Click Modules ---> Source Tab, check gen and src as sources

PS: The answer over a year old and the menus have changed.