Unresolved reference: fun, args, printIn, string

Answered

originally those were the errors I was experiencing but since then I'v reinstalled it in a different place and changed some settings and now im getting all these errors. I plan on putting it back where i originally installed it at though so im really only wondering about the unresolved references.

 

Information:Kotlin: kotlinc-jvm 1.3.31 (JRE 1.8.0_211-b12)
Information:5/24/2019 10:20 AM - Build completed with 38 errors and 0 warnings in 9 s 736 ms
C:\Users\marsh\IdeaProjects\test2\src\kjyg.kts
Error:(1, 15) Kotlin: Expecting ')'
Error:(1, 30) Kotlin: Unexpected tokens (use ';' to separate expressions on the same line)
Error:(1, 1) Kotlin: Unresolved reference: FUN
Error:(1, 1) Kotlin: No script runtime was found in the classpath: class 'kotlin.script.templates.standard.ScriptTemplateWithArgs' not found. Please add kotlin-script-runtime.jar to the module dependencies.
Error:(1, 11) Kotlin: Unresolved reference: ArgS
Error:(1, 17) Kotlin: No value passed for parameter 'size'
Error:(1, 17) Kotlin: No value passed for parameter 'init'
Error:(1, 17) Kotlin: Function invocation 'Array<string>(...)' expected
Error:(1, 23) Kotlin: Unresolved reference: string
Error:(2, 5) Kotlin: Unresolved reference: printIn
C:\Users\marsh\IdeaProjects\test2\src\liujhlkj.kt
Error:(1, 1) Kotlin: Expecting a top level declaration
Error:(1, 5) Kotlin: Expecting a top level declaration
Error:(1, 9) Kotlin: Expecting a top level declaration
Error:(1, 10) Kotlin: Expecting a top level declaration
Error:(1, 14) Kotlin: Expecting a top level declaration
Error:(1, 16) Kotlin: Expecting a top level declaration
Error:(1, 21) Kotlin: Expecting a top level declaration
Error:(1, 22) Kotlin: Expecting a top level declaration
Error:(1, 28) Kotlin: Expecting a top level declaration
Error:(1, 29) Kotlin: Expecting a top level declaration
Error:(1, 31) Kotlin: Expecting a top level declaration
Error:(1, 31) Kotlin: Conflicting overloads: public fun <no name provided>(): Unit defined in root package in file liujhlkj.kt, public fun <no name provided>(): Unit defined in root package in file test12.kt
Error:(1, 31) Kotlin: Function declaration must have a name
Error:(2, 5) Kotlin: Unresolved reference: printIn
C:\Users\marsh\IdeaProjects\test2\src\test12.kt
Error:(1, 1) Kotlin: Expecting a top level declaration
Error:(2, 1) Kotlin: Expecting a top level declaration
Error:(2, 5) Kotlin: Expecting a top level declaration
Error:(2, 6) Kotlin: Expecting a top level declaration
Error:(2, 10) Kotlin: Expecting a top level declaration
Error:(2, 12) Kotlin: Expecting a top level declaration
Error:(2, 17) Kotlin: Expecting a top level declaration
Error:(2, 18) Kotlin: Expecting a top level declaration
Error:(2, 24) Kotlin: Expecting a top level declaration
Error:(2, 25) Kotlin: Expecting a top level declaration
Error:(2, 27) Kotlin: Expecting a top level declaration
Error:(2, 27) Kotlin: Conflicting overloads: public fun <no name provided>(): Unit defined in root package in file liujhlkj.kt, public fun <no name provided>(): Unit defined in root package in file test12.kt
Error:(2, 27) Kotlin: Function declaration must have a name
Error:(3, 5) Kotlin: Unresolved reference: printIn

0
12 comments
Avatar
Yaroslav Bedrov

Hello,

Please try to remove and then add again "Kotlin" library in "Project Structure | Module - Dependencies"

0
Avatar
Permanently deleted user

i went to project structure and didnt find kotlin at all only "kotlinjavaruntime" then when i looked in module-dependencies i didnt see it either.

0
Avatar
Permanently deleted user

0
Avatar
Permanently deleted user

0
Avatar
Yaroslav Bedrov

Is it possible to share project sample for investigation?

0
Avatar
Permanently deleted user

like this?

0
Avatar
Yaroslav Bedrov

You should use "String" instead of "string". Then please try to run "File | Invalidate Caches"

0
Avatar
Permanently deleted user

k after invalidating the caches, i see the run option i think but its still not recognizing my commands.

0
Avatar
Yaroslav Bedrov

Please try to update Kotlin plugin (click on "Install" on the suggestion popup in the bottom right corner). Do you face this issue with Kotlin projects only? Does it work fine with sample Java code?

0
Avatar
Permanently deleted user

i updated the kotlin plugin and still no luck. trying a sample java code worked for me.

0
Avatar
Yaroslav Bedrov

Please try to install 2019.2 EAP (without importing settings from previous version) and check the issue there.

0
Avatar
Permanently deleted user

there's no difference between "config or installation" files and import settings correct?

0

Please sign in to leave a comment.