IntelliJ build project (Ctrl + F9) failed Error: 0 - intellij-idea

I have a LibGDX project created by gdx-setup.jar file. I recently run into an issue when build the project with Ctrl + F9, IntelliJ always returns error message: Error: 0 (see image bellow).
Basically I don't know what IntelliJ does when I press Ctrl + F9 and the error message is too short so I don't know how to google for this error. Anyone help me to figure out why this happens please.

Related

Intellij IDEA Terminal issue

I am using Intellij IDEA for Python. There is a terminal inside the IDE, on which I tried to run a command for making text file. I ran the command:
type null > HelloWorld.txt
It showed an error, but it worked correctly. The text file was created but it showed the following error (This problem is only in Intellij IDEA, it works correctly on command prompt):
type : Cannot find path 'D:\KARTEEK\document space\school\Class-7\My Python Projects\Kivy GUI\null' because it does not exist.
At line:1 char:1
+ type null > HelloWorld.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\KARTEEK\docu...s\Kivy GUI\null:String) [Get-Content], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
But the file was made. Please help

Attempting To Run Kotlin Project In IntelliJ Idea But Getting Bug Error

My Previous Question + More
I am trying to start learning Kotlin, and I have installed IntelliJ Idea from JetBrains, I really like the layout of the IDE, and so I don't really want to change it.
Whenever I try to run the program, I get the following error:
Could not open init generic class cache for initialization script 'C:\Users\Jacob\AppData\Local\Temp\wrapper_init1.gradle' (C:\Users\Jacob\.gradle\caches\6.6.1\scripts\9x7j38tmeo1ohlyu8452ntfdm).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
I know it's not the code, and since I am not very familiar with IntelliJ Idea or Kotlin, I have no idea where to start looking for the error or where to fix it...
Someone said that this question's answers were the solution, but I looked their, tried what it shows, but still found now solution for my situation... When I follow what they say, I get the same error.
Someone please help!!! 😁
I created instruction:
Install JDK (for example Oracle JDK 14)
Open project folder with build.gradle and settings.gradle in Idea
Add JDK to project: press F4 on left Project Tool -> SDk -> Add -> Apply
Set new SDK to project: press F4 on left Project Tool -> Project -> Project SDK -> Set new SDK -> OK
Set new SDK to Gradle Build Tool: press Ctrl + Alt + S -> Find gradle in search -> Go to Gradle JVM -> Set new SDK -> OK
Create new directory src/main/kotlin/main.kt with code
fun main() {
val jdk = System.getProperty("java.version")
println("Using JDK: $jdk")
}
Go to main.kt in Editor and press Ctrl + Shift + F10 and you must see your JDK version in console like: Using JDK: 14.0.2
Take a look sample project

intellij IDEA - Edit Configuration

I installed IntelliJ IDEA with Java10.
I am having troubles with the build and run. I am being asked to edit the configuration.
I have specified the JDK 10 in the module settings. Is that a bug ?
And, I get this error when I try to compile with a random configuration setting.
Error: Could not find or load main class
Caused by: java.lang.ClassNotFoundException:
this part is really confusing and not really user-friendly and well documented by JetBrain I find
Right mouse click on the code window and select Run Your_file_name.kt
It will show you the green button to run the script instantly like below screenshot. click on that button.

Play Framework & IntelliJ - Cannot resolve symbol index/routes

I'm new to playframework/intellij and I have finally managed to import a play-java-intro succesfully (yey!), but when I try to edit the Application.java file, I see the error shown in the picture below "Cannot resolve symbol index" and "Cannot resolve symbol routes".
What does this mean? How do I get rid of these errors/warnings?
I have tried to run the program aswell to see if it works, and the project works. This means that the errors are showing false.
Also, how do I refresh the project in IntelliJ? I once managed to do this, but that was after a popup came in the topright corner. I have never managed to find the refresh button after that. Just a "Synchronize Project", which does nothing.
Do as following:
1- In intelliJ navigate to Project Structure > Modules
2- In the sources tab find target > scala_2.11 > src_managed > main and click on it.
3- Mark in as 'Sources' by clicking the button on top of browsing pane.
4- Click OK
That should be it.
I was having a similar issue and I Have updated my IntelliJ to version 2017.3 and everything is working fine now.
In Intellij 2022 try running sbt run once and hit the url (e.g localhost:9000) .
Tested on Play official samples

Cannot resolve method 'ok(?)' with Play 2 Framework in Intellij

I have been trying to get play set up in IntelliJ for hours but I can't get it to work correctly.
I continuously get this error: http://imgur.com/MYY8fXI
I have tried create a project though the terminal with:
play new
and then using the terminal to create the idea files with
idea with-sources=yes
I have also installed the play 2 plugin and used it to create the project, but I get the same error.
I am able to use the plugin I downloaded to successfully run the app and view it in my browser, but I keep getting the
Cannot resolve method 'ok(?)' error.
edit: I am using OSX, and have the ultimate version of Intellij.
edit 2: I have made a little progress. If I import the view directly using import views.html.index; it gets rid of the errors on the application. However, if I use import views.html.*; it results in the errors. Any ideas?
At the time of this writing, it seems that play2 support in IntelliJ 13 Ultimate has some minor problems...
How I did solve the issues:
1) Navigate to your project director and start your play console (play.bat / play.sh should be on the PATH)
2) enter command 'compile' in your play console
3) enter command 'idea" in your play console
4a) in case your IntelliJ project was alread open, IntelliJ will detect the changes and suggest to reload the project. Confirm you want to reload
4b) in case IntelliJ was not running, open the project by File | Open... and select your project Directory.
These steps should resolve your issue.
Does it help to make sure that play has compiled the templates to class files, 'run' + open in browser or 'compile'?