UFO ET IT

JDK 1.8 (C : \…)에 연결된 IDEA 주석이 없습니다. 일부 문제가 발견되지 않습니다.

ufoet 2020. 12. 2. 22:19
반응형

JDK 1.8 (C : \…)에 연결된 IDEA 주석이 없습니다. 일부 문제가 발견되지 않습니다.


Android Studio 3.1.2에서 편집기 상단의 노란색 테이프 프레임에 갑자기 다음 메시지가 표시됩니다.

JDK 1.8 (C : \ Program Files \ Android \ Android Studio \ jre)에 연결된 IDEA 주석이 없으며 일부 문제가 발견되지 않습니다.

또한 구성 편집에 경고가 있습니다.

기본 활동을 찾을 수 없습니다.

이러한 문제를 어떻게 해결할 수 있습니까?


해결책

  • Android Studio 닫기
  • 로 이동 C:\Users\UserName\.android하여 build-cache폴더 이름 build-cache.bak
  • C:\Users\UserName\.AndroidStudio3.2\system이 폴더로 이동하여 이름을 바꿉니다.

    caches ...에 caches.bak

    compile-server ...에 compile-server.bak

    compiler ...에 compiler.bak

    conversion ...에 conversion.bak

    external_build_system ...에 external_build_system.bak

    frameworks ...에 frameworks.bak

    gradle ...에 gradle.bak

    resource_folder_cache ...에 resource_folder_cache.bak

  • Android Studio를 열고 프로젝트를 다시 엽니 다.


2018 년 10 월부터 3.2.1 버전 작업을 해왔습니다 ( 1 개월 ).
하지만 오늘 저는 AndroidStudio에서 많은 오류로 프로젝트를 시작했습니다.

나는 시도했다 Invalidate Caches and Restart. 그러나 그것은 나를 도왔습니다.

그래서 폴더를 열었습니다 C:\Users\{username}.
가 나는 3 개 폴더를 발견 : 실제 버전에 한 - .AndroidStudio3.2및 이전 버전의 두 - .AndroidStudio3.1.AndroidStudio2.3.

여기에 이미지 설명 입력

실제 버전으로 만 폴더를 삭제할 수 있지만 모든 폴더를 삭제했습니다. ( AndroidStudio에 중요한 사용자 설정이 없기 때문에 ).

그런 다음 AndroidStudio를 다시 시작하고 "설정을 가져 오지 않음"을 선택했습니다. 이렇게 :

여기에 이미지 설명 입력

이 방법은 저에게 효과적이었습니다.


이동 File -> Invalidate Caches / Restart... -> Invalidate Caches and Restart


3.2.1 버전에서 지난주 이후로 동일한 문제가 발생했습니다.

저에게 도움이 된 것은 "C : \ Users {username} \"에있는 ".AndroidStudio3.2"(. AndroidStudio3.1) 폴더를 제거 (또는 백업으로 이동할 수 있음) 한 다음 Android Studio를 다시 엽니 다.

While launching I selected to import settings from the last version and proceed. it will reconfigure all the settings.

Try that.


For me, clicking "Attach Annotations" at the top right of the yellow notification bar helped.

This following resource helped as well: https://www.jetbrains.com/help/idea/annotating-source-code.html

But be wary:

The annotations artifact requires JDK 1.8 or higher. If your project is compiled using JDK 1.5, 1.6 or 1.7, use the annotations-java5 artifact instead.


I'm going to share some information I just discovered about Invalidate Cache / Restart, and I think it's strongly related to the 3.2.1 release. This may explain why it works for some people and why it doesn't work for others. I discovered this problem regarding a different situation, but I think it might be relevant to this problem, so it may be worthwhile giving it a try.

There are times when the Invalidate Cache / Restart won't clear the cache for an opened project. I'm not sure what gets you into that state, but that happened to me. What I did to correct the problem was to rename the project directory name, open Android Studio with the new renamed name, then run Invalidate Cache / Restart. I then closed the project, renamed the project directory name back to it's original name and then opened Android Studio using the original name and that fixed my problem.

In my situation, the problem I was having was that Android Studio was improperly displaying the contents of a file, but when I examined the file using an external viewer, the file actually had the correct content. So, my guess was that, Invalidate Cache / Restart would fix the problem. But it didn't work until I did the little trick I mentioned above. So that's why I sharing my discovery, since it might explain why Invalidate Cache / Restart works for some people and not others. Again, I don't yet have a clue on how a project gets into the state where it where it won't Invalidate Cache for an open project. Possible and file lock issue, or some background executor task responsible for clearing the cache for the opened project doesn't get run before Android Studio restarts.


Update: I actually had the exact same problem occur in one of my projects. Invalidate Cache / Restart did not work until I need my little trick of renaming the project, opening it, Invalidate Cache / Restart, close project, rename project back to original name, an opening it. The message No IDEA annotations attached to the JDK 1.8 was then gone.

One of the things I tried that didn't work, was to close the project that had the problem and run Invalidate Cache / Restart from a different project. So it's not quite accurate to say the Invalidate Cache / Restart sometimes doesn't work for opened projects. I have reported the problem to the android group through the "Submit Feedback" channel. They should be able to figure out what the internal code issue is. It would be useful to find my post to that team and add that you're experiencing the same problem.


I just found the solution. Follow the path:

File -> Invalidate Caches / Restart...

Remove caches folder from C:\Users\username\ .AndroidStudio3.3\system and re import project worked for me.


Both errors mentioned in the question also showed up on my computer. This worked for me:

  • Remove and re-install Android Studio
  • 설치 중에 Android Studio 설정을 유지하라는 메시지가 표시되면 설정을 유지하지 마십시오.
  • 디스크에서 프로젝트를 열지 마십시오. 버전 제어 시스템에서 프로젝트를 다시 가져옵니다 (예 : GitHub).

새로운 Android Studio 업데이트 버전 3.3을 사용할 수 있으며 내 문제가 해결되었습니다. 즐거운 코딩입니다.

참고 URL : https://stackoverflow.com/questions/50740240/no-idea-annotations-attached-to-the-jdk-1-8-c-some-issues-will-not-be-fo

반응형