How to disable the add library to classpath intention

Answered

The add library is first when I activate the intention, but this project should not have this library, so I want to disable these intentions.

0
5 comments

Enaium If you can find “Add library…” under “Editor → Intentions”, uncheck it there and see if it helps. If it can not be found there, please try below and see if it helps:

  1. Place the caret on the highlighted error.
  2. Press Alt + Enter to open the intention list.
  3. Move the selection to “Add library … to classpath”.
  4. Press the right arrow (→) to open the submenu.
  5. Choose “Disable ‘Add library to classpath’ intention”.

 

0

1. Intentions do not have the add library to classpath.

2. The intention does not have a submenu.

0

Enaium How about:

  • Gradle tool window → Reload All Gradle Projects
  • Then File → Invalidate Caches / Restart
0

The library is needed for another subproject. So the intention is not a cache problem

0

Enaium In that case, “Add library to classpath” seems to be expected behavior, the real question is if this class should be visible in the current module. If not, the reference shall be removed. 

If that's not the case, please consider share a minimal project in a new YouTrack ticeket with the log attached, we can check further from there.

0

Please sign in to leave a comment.