Android的工作室无法解决的R导入项目? [英] Android Studio cannot resolve R in imported project?

查看:216
本文介绍了Android的工作室无法解决的R导入项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

解决方案
  1. preSS F4成项目结构,检查软件开发工具包
  2. 点击模块 - > 源代码标签,检查 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!

解决方案

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

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

这篇关于Android的工作室无法解决的R导入项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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