I am using Spock framework for tests and everything worked great, until today; I do not know what happened. Intellij says "Configure Groovy sdk" so I downloaded groovy sdk 2.4.9 and configured it, but in my test class in import line:
import spock.lang.Specification
intellij says "cannot resolve symbol spock". Any suggestions?
I'm playing with spock tests in an Intellij gradle environment and could not resolve this until I added the following line to my dependencies in build.gradle:
compile 'org.spock.framework:spock-core:1.0-groovy2.4'
Related
I am trying to launch a cucumber (written in kotlin) via intellij.
I have a step definition class described as followed :
When I launch the test from Intellij, I have this Exception on the "Given" method: java.lang.IllegalStateException: Could resolve the return type of the lambda at BusinessEventSteps.kt:19
When using "mvn clean install" from a command line, the test runs fine.
My environment:
MacOS
Coretto 11.0.11
Intellij 2021.1.1
Kotlin 1.4.10
cucumber 6.10.4
Found a workaround.
It seems that the issue has something to do with the native Intellij compiler. Editing the Run/Debug Configurations and replacing the default "Build" step by a maven goal, everything works fine.
Hope this will help others !
I'm using the latest IntelliJ IDEA Community IDE with the latest Python plugin to edit Jython code. In the IDE I can edit and run pure Python code using the Jython runtime installed on the machine.
However when I import a java class, the IntelliJ IDE marks the elements in the import statement as "unresolved references". But the code itself correctly runs.
Is there anyway to convince the IntelliJ syntax highlighting that this is valid Jython code?
One solution to my issue was to install the Jython Helper plugin (also on Github). This plugin creates stub files for any Java class that is referenced by a Jython program. Once the stub files are created then the red lines go away. But as I have already proved, the red lines are not an impediment to actually running the code.
Note that I am not associated with this plugin, I only discovered it after posting my question.
Iv'e started to learn and use sbt, so far I didn't start project directly from IntelliJ, what I did was pulling some seed project and using IntelliJ with Scala Plugin as IDE.
As long as I kept pulling seed projects and editing them everything was just fine, but when I tried to generate sbt project directly from IntelliJ I followed simple instructions and faced this error
Error while importing SBT project: Error during sbt execution: No
Scala version specified or detected Java HotSpot(TM) 64-Bit Server VM
warning: ignoring option MaxPermSize=384M; support was removed in 8.0
The auto generated build.properties :
sbt.version = 1.0.3
The auto generated build.sbt :
name := "MyProject"
version := "0.1"
scalaVersion := "2.12.4"
And i'm getting "Cannot resolve symbol" on every property at build.sbt file..
Things Iv'e tried to solve this problem:
Uninstalling and reinstalling IntelliJ, IntelliJ Scala Plugin, sbt and scala
Adding scala under Framework Support
Trying to add scala to Facets at Project Structure (I didn't even have a scala option)
Double checking that scala SDK is configured at Global Libraries at Project Structure with the correct version
My currently environment consist of:
Windows 10
IntelliJ IDEA CE 2017.2.6
IntelliJ Scala Plugin 2017.2.13
Java 8 151
sbt 1.0.3
scala 2.12.4
Thanks!
In order to solve this I :
Completely uninstalled intellij, with all it's configuration
Upgraded to intellij 2017.3 CE
i have some restriction to download the plugins for intellij.
In this case how can i compile my app using lombok.
i have tried to paas lombok jar through VM options in run configuration but no luck. any suggestion will be appreaciated.
You can still use Lombok in your code, provided you instructed your build tool to have a build-time dependency.
Without the Plugin, that will result in a lot of red wavy underlines in IntelliJ. But the code would still compile and run.
Disclosure: I am a Lombok developer.
I have installed IntelliJ and trying to import a gradle project but facing this error... Please Help me out
Java is 1.8 version
Gradle is not getting configured