New empty Kotlin project with sample code not compiling/running out of the box

已回答

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

0
Hi Bill - what is the version of your IDE and Kotlin plugin?
0

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.

0

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.

0

请先登录再写评论。