
If you are trying to access a class and its member variables and methods in IntelliJ IDE for an external dependency (be it Maven or Gradle) you may see a tooltip saying "Cannot find declaration to go to" if the source of the class is not available.

If you hover over your class if you see "Java file outside of source root" and when you try to run the main method you would not be able to run the application with a message "Nothing here"
Solution:Open installed Plugins (press Shift key twice) and disable Gradle and restart IntelliJ, you will be prompted to enable Gradle, once dependencies and their source are downloaded and the build is complete, this error should be fixed.
- How to Get List of All Country Codes in Java Using Locale Class
- Unsupported major.minor version 52.0 in java
- Java - How to set custom thread name?
- Get the current timestamp in Java
- Java Spring Boot 3 Web Hello World with Gradle in IntelliJ
- [fix] NullPointerException Cannot Invoke findById because Repository is null - Java Spring
- java: unclosed string literal [Error]
- Convert Java Byte Array to String with code examples
- Error: Can not find the tag library descriptor for
- Java 8 - Convert List to Map Examples
- Java - Calculate time taken for the code to execute in milliseconds or nanoseconds
- Fix java.net.ProtocolException: Invalid HTTP method
- Java: Convert Stream to List
- Java equals method - Tutorial
- List of Java JDBC Database Driver Jars, Classes and URLs Details
- Read YAML file Java Jackson Library
- How to display Java Date Time timezone GMT/UTC offset using SimpleDateFormat
- List of Java Keywords
- Enable JSON Pretty Print in Java Jackson
- How to Word-Warp Console logs in IntelliJ
- Convert Map to List in Java 8 using Stream API
- Create a Directory using Java Code
- Ways to Convert Integer or int to Long in Java
- [Program] How to read three different values using Scanner in Java
- Java JDBC Example with Oracle Database Driver Connection
- How to add Back Button on Toolbar in Android [Tutorial] - Android
- Best Free Gif screen capture app now available for M1 Chip Mac - LICECap - MacOS
- Run SQL Script file using Java JDBC Code Example - Java
- Maven Eclipse (M2e) No archetypes currently available - Java
- 🎃 Trending, Popular Halloween hashtags for year 2020 🎃 [Facebook, Twitter, Instagram, Snapchat] - Hashtags
- Mac (macos) startup keyboard boot sequence combinations - MacOS
- How to Install Git on Ubuntu Linux - Git
- Delete blank lines in a file using Notepad++ - NotepadPlusPlus