New empty Kotlin project with sample code not compiling/running out of the box
Answered
Hi all,
I have created a new empty kotlin project with the default sample code, using the "intellij" build system. But the code would not complile/run with the following errors:
"Kotlin: Cannot access built-in declaration 'kotlin.Array'. Ensure that you have a dependency on the Kotlin standard library"
Is something messed up with the empty project created by IDEA.
Thanks and Regards,
bill
Please sign in to leave a comment.
Idea version is intellij-idea-community-edition 4:2022.2.3-2.
Kotlin version is kotlin 1.7.20-1.
Both were installed from Arch Linux official repo using pacman.
Please try to remove (rename) config and system [IDEA directories](https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory), remove .idea project directory and reimport the project. Also, check that Project JDK is valid.