No IDEA annotations attached to the JDK 1.8 (C:\...), some issues will not be found
Solution 1
Solution
- Close Android Studio
- Go to
C:\Users\UserName\.android
and rename thebuild-cache
folder tobuild-cache.bak
-
Go to
C:\Users\UserName\.AndroidStudio3.2\system
and rename these folderscaches
tocaches.bak
compile-server
tocompile-server.bak
compiler
tocompiler.bak
conversion
toconversion.bak
external_build_system
toexternal_build_system.bak
frameworks
toframeworks.bak
gradle
togradle.bak
resource_folder_cache
toresource_folder_cache.bak
Open the Android Studio and open your project again.
Solution 2
I have been working on 3.2.1 version since October 2018 (for 1 month).
But today I started my project in AndroidStudio with a many errors.
I tried to Invalidate Caches and Restart
. But it doesn’t helped me.
So, I opened the folder C:\Users\{username}
.
There I found three folders: one for the real version - .AndroidStudio3.2
and two for older versions - .AndroidStudio3.1
and .AndroidStudio2.3
.
I could only delete the folder with the actual version, but I deleted all the folders. (Because I have no important user settings in AndroidStudio).
Then I restarted AndroidStudio, and I chose “Do not import settings”. Like this:
This method worked for me.
Solution 3
Go to File -> Invalidate Caches / Restart... -> Invalidate Caches and Restart
Solution 4
I am also stuck with this same issue since last week on 3.2.1 version.
What worked for me is to remove (or you can move it as a backup) the ".AndroidStudio3.2" (for you it will be .AndroidStudio3.1) folder located in "C:\Users{username}\" and then reopen the Android Studio.
While launching I selected to import settings from the last version and proceed. it will reconfigure all the settings.
Try that.
Solution 5
My answer might come late, but here is what fixed the issue for me:
Turn off Android studio
Open
C:\Users\UserName\.android
and rename thebuild-cache
folder tobuild-cache.bak
Open
C:\Users\UserName.AndroidStudio3.2\system
. Rename the files: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
Restart Android Studio; it will generate those folders again.
After the success, delete the
.bak
files.
Morteza Baghalpoor
Updated on July 05, 2022Comments
-
Morteza Baghalpoor almost 2 years
In Android Studio 3.1.2 I am suddenly getting the following message in a yellow tape frame at the top of my editor:
No IDEA annotations attached to the JDK 1.8 (C:\Program Files\Android\Android Studio\jre), some issues will not be found
I also have a warning in Edit Configurations:
Default Activity not found
How can I solve these issues?
-
Tom Rutchik over 5 yearsNew update: It originally looked like the technique I described fixed the problem, but when I visited the project again this morning, the error message "No IDEA annotations attached to the JDK 1.8" has come back. I'm at a lost being able to explain what I observed. What I'm also seeing is that projects that didn't have this error message are all suddenly having this same error message.
-
Tom Rutchik over 5 yearsMy last update: Levi Ricki Saptra solution seems to have solved the problem. His solution looks like to me to be a manual way to force all of cache to be cleared for all projects. You would think that Invalidate Cache / Restart would have been the equivalent of his solution, but that doesn't appear to be the case. Good job Levi!
-
Arie Agung over 5 yearsthis also worked for android:xxxx unknown attribute error warning in layout file.
-
Louis over 5 yearsIt helps me a lot,thanks.I think this solve can work because some of these file was broken.When we rename the folder,AS will make a new folder(or download?not sure)
-
Levi Rizki Saputra over 5 yearsThis method actually renames that files so that Android Studio doesn't recognize it. This method is actually same as deleting that files. I renamed that files only to backup if an error occurred in Android Studio. So, you can solve the problem by deleting that files.
-
Mairyu about 5 yearswhen you say 'improperly displaying the contents of a file', by any chance, do you .java files look like XML files w/ totally different content ? This stumped me for weeks. I usually import my project from github and start over, VERY annoying and it keeps happening
-
Neelay Srivastava about 5 yearsjust remove the system folder from the current version and replace it with old version worked for me
-
Tom Rutchik almost 5 yearsYeah, that's exactly what I saw!
-
sanevys almost 5 yearsThank you, do you know what caused it?
-
Giulio Caccin over 4 yearsCan you please add some more information in case the link is not working?
-
Taki over 4 yearsI have edited my answer and provided the steps i followed to solve my issue