操作方法
R文件确实是存在的,只是提示找不到R文件而已,导致整个代码文件中全是错误,但是还是能正常编译运行。通过努力查找,原因是Intellij IDEA对单个文件的大小默认限制为2500kb, android studio是基于Intellij IDEA的,文件大小是1024进制。出现的错误现象如下图:
进入Androidstudio 的安装目录C:\Program Files\Android\Android Studio\bin,找到文件idea.properties
用记事本打开idea.properties文件,查找idea.max.intellisense.filesize=2500的值
找到idea.max.intellisense.filesize=2500后将2500改成5000,保存。
重启Androidstudio.一切恢复正常。