JetBrains / intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Apache License 2.0
3.14k stars 638 forks source link

Build error: Supertypes of the following classes cannot be resolved #237

Closed intgr closed 2 years ago

intgr commented 2 years ago

Describe the bug: I created a GitHub repository https://github.com/intgr/test-idea-plugin based on this template (no modifications).

Steps to reproduce: Opening this with IntelliJ IDEA Ultimate 2022.1 EAP and 2021.3.2 and running the "Run Plugin" run configuration fails with errors:

Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:

class com.intellij.DynamicBundle, unresolved supertypes: com.intellij.AbstractBundle class com.intellij.openapi.project.Project, unresolved supertypes: com.intellij.openapi.components.ComponentManager, com.intellij.openapi.extensions.AreaInstance

Expected behavior: Should build out of the box.

Additional context: I've been trying to get hot-reloading to work with the Mypy plugin (https://github.com/leinardi/mypy-pycharm/pull/90), but it's unclear what the workflow for hot-reload plugin development should look like. The experience has been confusing, with unclear and sometimes conflicting recommendations in IntelliJ support, documentation, StackOverflow, etc. I assumed I could take ideas from the pristine example project, but it doesn't even build out of the box. It's likely that the problem is on my end, but I've spent many hours and learned little. Sorry for this rant.

YannCebron commented 2 years ago

please check: 1) Gradle JVM should be set to Java 11 (see Settings/Preferences | Build, Execution, Deployment | Build Tools | Gradle) 2) your project SDK should also be set to Java 11

intgr commented 2 years ago

Thanks! Sorry, I forgot to test out the suggestion.

I can confirm now that the plugin runs successfully, with Gradle JVM and SDK set to Java 11.