Error while compiling the kotlin program in IDEA - kotlin

I got an error while compiling the kotlin program in IDEA, as shown below:
Error: Kotlin: Kotlin home does not exist or is not a directory: D:\JavaProgram\JetBrains\kotlin.
What's the reason?

Try doing this.
killall java
./gradlew clean assemble
Also check this link

Related

undefined symbol: __afl_area_ptr when trying to compile Kisak strike

I want to fuzz the map loading feature in counter strike. The source code for csgo got leaked a while back and here is a build which you can compile https://github.com/SwagSoftware/Kisak-Strike . However, when I try to compile it using this command:
AFL_USE_ASAN=1 PERSIST=1 cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_ROCKETUI=ON -DFREETYPE_LIBRARY=/usr/lib/x86_64-linux-gnu/libfreetype.so -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/freetype/ -DUSE_KISAK_PHYSICS=ON -DCMAKE_C_COMPILER=/home/cyberhacker/Asioita/Hakkerointi/Counterstrikestuff/aflpp/afl-gcc-fastthing/AFLplusplus/afl-gcc-fast -DCMAKE_CXX_COMPILER=/home/cyberhacker/Asioita/Hakkerointi/Counterstrikestuff/aflpp/afl-gcc-fastthing/AFLplusplus/afl-g++-fast ..
and then when i try to run ./csgo_linux64 , it throws this error:
Failed to load the launcher(bin/linux64/launcher_client.so) (/home/cyberhacker/Asioita/Csgocompile/withjump/game/bin/linux64/libtier0_client.so: undefined symbol: __afl_area_ptr)
I am expecting it to just work as usual (same as with the regular build). It works completely fine when I try to compile it normally with this command:
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_ROCKETUI=ON -DFREETYPE_LIBRARY=/usr/lib/x86_64-linux-gnu/libfreetype.so -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/freetype/ -DUSE_KISAK_PHYSICS=ON -DCMAKE_C_COMPILER=/usr/bin/cc -DCMAKE_CXX_COMPILER=/usr/bin/c++ ..
and then make -j8
I searched a bit and found this: this . In that conversation they say that this error can be cause by compiling with afl-gcc but then linking with normal gcc or ld. However this is not the cause of my problem since I have looked through the cmake log files and the binaries are being linked with afl-g++-fast so this shouldn't be a problem in my case. I read somewhere that the libraries should be statically included, not dynamic but I do not think that it is a necessity. Feel free to look at the Kisak strike source code if you want to (obviously).

Kotlin compiler error -d invalid argument

I am getting an error when I go to compile the kotlin cmd file for Windows, using their Hello, World! one, but I had to modify part of the compile command to get the -target part to be valid. I am not sure how to fix the invaled -d argument that they show to use.
The text editor is Visual Studio Code.
Compiler: Kotlin-native-windows-1.4.32.zip from JetBrains' GitHub account - https://github.com/JetBrains/kotlin/releases/tag/v1.4.32
My compiler command is kotlinc.bat helloworld.kt -target mingw_x64 -d "hello world/hello world.jar"
Output:
error: invalid argument: -d
info: use -help for more information
How can I fix this?
This is the Kotlin/Native compiler, and it supports a different set of command-line arguments.
The solution is to download the Kotlin/JVM compiler from the archive named kotlin-compiler-1.4.32.zip.
Since Kotlin 1.5-M1, the Native compiler will show a clarifying warning for this case: Native / CLI: provide a way to show difference between Jvm and Native compilers.

D8: Program type already present: androidx.renderscript.Allocation$1

I have a react-native application, using RN 0.62.2, that is working properly.
When trying to use hermes instead of JSC, I am getting the following error during build:
D8: Program type already present: androidx.renderscript.Allocation$1
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Program type already present: androidx.renderscript.Allocation$1
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Any idea what to do?
Have you tried running cd android && ./gradlew clean after switching from jsc to hermes, as the docs suggest (https://reactnative.dev/docs/hermes)?

Can not run Clojure project with Cursive using Leiningen

I am unable to run a simple test project using the intellij plugin cursive. I am able to open a REPL without any problems and can even call functions defined in the core.clj file.
Running the project directly however yields this error message:
Error running 'new-project.core': failed to access class com.intellij.execution.impl.ProcessStreamsSynchronizer from class com.intellij.execution.impl.ConsoleViewRunningState (com.intellij.execution.impl.ProcessStreamsSynchronizer is in unnamed module of loader com.intellij.util.lang.UrlClassLoader #402f32ff; com.intellij.execution.impl.ConsoleViewRunningState is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader #c9a79eb)
Intellij run configuration here. Changing How to run it and What to run does nothing.
Starting the project via the Leiningen tab yields the same error message.
There is an issue open about it.
https://github.com/cursive-ide/cursive/issues/2350
Also I tried to do lein run Let me know if this work for you.

How Can I Clear A Kotlin Error in JavaFX?

I was trying to fix an error in a JavaFX program from an on-line course. In researching someone said moving a file cleared the error.
When I moved my todoItemDialog.fxml file it gave me this error even though Kotlin is not involved:
Error: Kotlin: The Kotlin standard library is not found in the module graph. Please ensure you have the 'requires kotlin.stdlib' clause in your module definition.
When I add the statement to my module-info.java tab in IntelliJ Idea is gives this error:
Module not found: kotlin.stdlib
I removed the requires statement and moved the todoItemDialog.fxml file back to it's original location but I still get the Kotlin error.
How can I clear the Kotlin error without starting over from the first line of code for this project?
I encountered this same error while running JavaFX code. Simply rebuilding the project will solve the error.
Build -> Rebuild Project