IntelliJ IDEA Kotlin plugin - "there aren't configurators available" - intellij-idea

I'm having problems using the Kotlin plugin in IntelliJ IDEA. First, upon opening a kotlin project, it pops up that I need to configure Kotlin in this project. But when I do so from the Tools menu, it says "there aren't configurators available"

I had this same problem in Android Studio 3.0 Canary 1. Cneal build, Synchronize, Invalidate Caches and Restart didn't help.
The only thing that worked was to make a change to a build.gradle file and click "Sync now".

I had the same problem with one of my Kotlin gradle project.
Go to View -> Tool Windows -> Gradle. There should be a Reimport all Gradle Projects icon at the top. (Circle with double arrows). Just click on it and it should refresh your gradle project with Kotlin configuration.

I realized the problem was my Gradle plugin was disabled.

This happened to me with Kotlin 1.3 and IntelliJ 2018.2.6.
I tried all the above solutions listed---none of them worked until I actually deleted the .idea folder and .iml file from my Kotlin gradle project directory and then re-imported them in IDEA, then all was well.

Restarting Android Studio and then going to File -> Invalidate Caches, checking "Clear file system cache and Local History" and "Clear VCS Log caches and indexes", and clicking the "Invalidate and Restart" submit button fixed the problem for me :)

Related

IntelliJ after update i can't load dart/flutter plugin

I updated IntelliJ community version via IntelliJ toolbox and now i can't run my code. Flutter doctor says that everything is ok.
In IntelliJ -> Settings -> Plugins, installed -> i don't see flutter or dart plugins and in plugins market is endless loading.
I tried uninstall but the problem persists
It's a known bug in the Toolbox application .
The workaround is to edit -Didea.plugins.path= in Help | Edit Custom VM Options to move plug-ins folder outside of the user's home directory.

"java.lang.IllegalArgumentException: Area already instantiated for: ProjectDefault (Template) Project" Idea-SBT plugin error

I'm using intellij Idea 2019.2 ultimate edition. After I updated from 2019.1. 2019.2 edition I get below exception frequently.
I couldn't submit the report to SBT as the report button is always disabled.
How could I stop this exception other than disabling the plugin?
The plugin hasn't been updated in a while and has the following deprecation messaged on its website:
DEPRECATION JetBrains have recently added support for an SBT console
to the IntellIJ Scala Plugin. This is now the recommended way to use
SBT within IntellIJ. No new releases of this plugin are planned.
Go to the "Before launch" options of a Run Configuration, uncheck
"Make" and choose "Run SBT Action / test-compile" to compile the
project with SBT. This plugin does not generate or synchronize your
IDEA project structure from the SBT build configuration. We recommend
using the native support for importing SBT in IntelliJ. For more
details, see:
http://blog.jetbrains.com/scala/2013/11/18/built-in-sbt-support-in-intellij-idea-13/
I figured I don't need it anymore and uninstalled it. This doesn't really answers you question but I don't think this issue will be solved by the plugin maintainer.

Can't find SBT-shell in IntelliJ IDEA

Facing some issue with the build, I deleted the project and .idea directories of my SBT project (containing submodules) followed by Invalidate Caches / Restart... (invalidated the cache too)
Ever since relaunch of IntelliJ, I can't locate the sbt shell
Interestingly, I'm still getting the sbt shell when I open my other projects (in which I didn't delete the project and .idea directories) in IntelliJ
I can confirm that I have the latest release of IntelliJ IDEA for MacOS with the Scala plugin installed
what fixed my problem was:
install scala plugin
restart
file -> close project
instead of open, click new project, select scala with sbt option,
then next
select the same project as location.
hope it will save you time and energy
In Intellij 2018, under Preferences - Build, Execution, Deployment - Build Tools - sbt, check "Use sbt shell for build and import (requires sbt 0.13.5+)". Then restart Intellij. The sbt shell tool window tab will appear in the bottom pane (if not, select it from View - Tool Windows - sbt shell).
In my case, scala plugin needed to be updated and accordingly this caused sbt to disappear from build tools. Go to Settings --> Plugins --> Updates and make sure that scala plugin is updated. If it wasn't and you updated it, you should restart the IDE afterwards.
After that removing the .idea folder and reimporting the project was necessary for the project to build.
You can select
Window → Restore Default layout
Or press Shift + F12
This will restore your default window layout and the tab will be visible again (You can check this works by hiding the sbt tab by right clicking and selecting 'Remove From Sidebar').
Some windows such as Maven or Ant need to be brought back by
View → ToolWindows → [Window Name]
In my case I enabled the sbt shell going to "File - Settings - Build, Execution, Deployment - Build Tools - sbt " and after enabling here, you need to restart your intellij and then you can find sbt-shell here "view- Tool window - sbt shell"

Grails application is not found after updating to IntelliJ IDEA Ultimate 2016.2

I have updated my IntelliJ IDEA Ultimate to the 2016.2 version.
I had a Grails 3 project and now when I open the IDE I get the following error when trying to run my project:
Error running Grails: My_Project: Grails application is not found
I can still open the terminal and run the project manually, but it seems that IntelliJ IDEA no longer recognises my Grails application. When going to "Edit configurations...", in "Application" it says "[none]" and I can't select anything.
Grails Version: 3.1.9
Groovy Version: 2.4.7
JVM Version: 1.8.0_66
A Simple solution to this is to refresh the gradle projects.
You can do this by popping out the little gradle tab and hitting the "Refresh All Gradle Projects"
I run into the same problem always when i restart intellij. Running grails clean command from the terminal fixed it.
First, re-import the project into IntelliJ 2016.2. Choose the build.gradle file for the import. Use the gradle wrapper or a local gradle installation, where you have given IntelliJ the path to the locally installed Gradle. Let IntelliJ re-index everything. Wait until you see no further indexing on the bottom of the screen.
Second, run the application once, with no edit configuration. After this completes with error, you should be able to choose Run -> Edit Configuration / Application.
Third, you can go into the project pane to the grails-app/init/app-name/Application.groovy file and right-click on that and choose Run. After that, an edit configuration will be created.
Finally, you can try to invalidate cache and restart. (This has nothing to do with Edit Configuration, but sometimes the gradle and/or .idea caches get out of sync.)
I had the same problem after updating to IntelliJ Ultimate 2019.2.
It seems that the "little gradle tab" of the accepted answer no longer exists.
The reason in my case was that the Gradle Plugin had been disabled by the update process.
Resolution: Hit Help > Find Action > Type gradle. You should see a line "Gradle" and a ON-OFF switch at the end of that line.
Enable it and restart IntelliJ solved my problem.

How to import and run existing plugins from intellij community edition repo

I'm trying to import and run the IntelliJ git4idea (Git Integration) plugin in order to play around and contribute some of my own code.
I've pulled the Intellij community edition from the github repo, and imported the git4idea plugin as a project. I'm running the Intellij community edition
My main issue is this:
After importing all the modules, the git4idea module comes up as a general module type, and not a plugin module type.
This means that when trying to create a new run\debug configuration, I get [none] under "Use classpath of module", instead of of the ability to select the git4idea plugin. This obviously results in a "Run configuration error: no plugin module specified for configuration".
So the question is -
How can I change the general type of imported "git4idea" to plugin type?
Or better yet, what are the steps required in order to import and build/debug/run a plugin from the Intellij community edition repo?
I was able to solve this by manually reordering file directories, sorting out dependencies and editing the .iml file. The type of plugin is defined by changing type="JAVA_MODULE" to type="PLUGIN_MODULE".
...
This is the answer given by Dmitry Jemerov on the official Jetbrains plugin development forum:
The easiest answer to this is "don't". The IntelliJ IDEA Community
Edition project is set up to be developed as a whole, and the
dependencies are set up accordingly. If you want to hack on the Git
plugin, you simply run IDEA using the provided run configuration, it
runs with all plugins enabled, and you simply make whatever changes
you need and test them using the main run configuration.
If you really want, you can set up a new plugin module and point it to
the source code of the git4idea plugin inside the IntelliJ IDEA
Community Edition Git checkout. This is not too hard, but it's
something you'll need to do from scratch, and you can't use the
existing .iml file.
I had the same no plugin module specified for configuration issue. To work around it, instead of importing, I created a new plugin project and used the existing code directory.
when you import the intelij plugin projects
You should run the 'runIde' task in gradle.
Step-by-step instruction
Build your IDEA plugin (usually done with gradle build).
Start Intellij IDEA.
If you have any project opened, go to menu "File->Close all projects" to return to Intellij IDEA startup screen.
Install the plugin you've just built: on the left side of the "Welcome to Intellij IDEA" startup screen go to "Plugins", then click "gear" icon on the right side, it's located to the right of "Marketplace" and "Installed". From the pop-up menu select "Install Plugin from Disk...", navigate to plugin file (usually in build folder) and click "Ignore and continue" when you see the warning message saying something about signature.
Restart Intellij IDEA.
Open the folder with your IDEA plugin.
Wait until IDEA imported your Gradle project.
Put breakpoints inside your plugin code so you can debug it.
Go to menu "Run->Edit configurations".
In the "Run/Debug Configurations" window on the left side click "+".
Select "Gradle" from the pop-up menu.
On the right side change "Name" to "gradle-run-ide" (without quotes).
On the right side under "Run", inside "Tasks and arguments" field enter runIde ("i" must be capital, other letters small).
Click "OK" to save changes.
Go to menu "Run->Debug 'gradle-run-ide'".
A new, black-colored IDEA window should appear.
In this black-colored IDEA window do whatever you need to do in order to invoke methods of your plugin. When you invoke them, the first IDEA window should stop you on breakpoints you set previously.
Happy debugging.
After changing type="JAVA_MODULE" to type="PLUGIN_MODULE" in *.iml file I was getting following error -
Error running 'IdeaPlugin': Wrong SDK type for plugin module
To fix this go to -
Module Settings -> Platform settings -> SDKs.
Click on Add new SDK
Select Intellij Platform plugin SDK
For home directory select your Inetllij installation dir
Select JAVA SDK you want to use with it.
Once this is added got to Module Settings again
Module Settings -> Project settings -> project.
In Project SDK change the JAVA sdk to the SDK we just added in the above steps.
Run/Debug you plugin now.