android studio: no idea annotations attached to the jdk 1.8 some issues will not be found

Android Studio今天早上打开项目提示错误信息:

No IDEA annotations attached to the JDK 1.8 (C:\Program Files\Android\Android Studio\jre), some issues will not be found
重新打开文件或者重新同步工程都无解,最后在https://stackoverflow.com/questions/50740240/no-idea-annotations-attached-to-the-jdk-1-8-c-some-issues-will-not-be-fo找到了解决方案。

解决

  1. 首先关闭Android Studio
  2. 打开计算机,转到C:\Users\UserName\.android文件夹,将build-cache文件夹重命名为build-cache.bak
  3. 转到C:\Users\UserName\.AndroidStudio3.2\system文件夹,并重命名下面的文件夹:
原文件夹名重命名后
caches caches.bak
compiler compiler.bak
compile-server compile-server.bak
conversion conversion.bak
external_build_system external_build_system.bak
frameworks frameworks.bak
gradle gradle.bak
resource_folder_cache resource_folder_cache.bak
  1. 重新打开Android Studio并同步工程。
posted @ 2019-06-19 10:26  夜行过客  阅读(931)  评论(0编辑  收藏  举报