在android studio,主要活动中,它说“无法解析符号R”。我尝试过重建和清理构建。我还将buld.gradle更新为2.1.3。 R以红色突出显示,主要活动的路径以红色下划线。谢谢你的帮助。
答案 0 :(得分:0)
试试这个: 转到文件 - 项目结构 - 项目并修改gradle版本和Android插件版本,如图像
清理项目并重建
如果问题仍然存在。转到项目路径并执行
gradle clean build
答案 1 :(得分:0)
尝试此方法:转到文件 - >使缓存无效/重新启动并单击无效缓存并重新启动 Image Here 如果仍然没有解决再试一次并清理项目和重建。 快乐的编码.. !!!
答案 2 :(得分:0)
Have you updated your Android Studio as well? If that's not the case then try to update your android studio. Latest stable version is 2.1. If you have already updated it then problem might arose from the last activity or code you have written in your application. Such errors usually occurs when you try to manually update manifest or gradle or other build files. If that's the case then clean and build project will definitely solve the issue. These problems also arose after unexpected shutdown of IDE and internal IDE errors. If that's the case then android studio prompts you to report the issue to Google, you can do the same to seek further help.