Home > Software design >  compileKotlin Failed, please help me
compileKotlin Failed, please help me

Time:12-24

I have an error problem with compileKotlin in IntelliJ IDEA. Tried changing the previous jvm or java version but still having the error as shown. can anyone help me solve this problem. please guysss...

this is a picture of the problem

CodePudding user response:

Does App.kt have this at the top?

package kotlin.kotlin.unit.test

You'll get that Only the Kotlin standard library is allowed to use the 'kotlin' package error if you do that - your package names can't start with kotlin.. Just use com.example.coolapps or something if you don't have your own domain.

If you rename it, Android Studio will complain that the package name doesn't match the file's location (the package needs to match the folder structure - see in the path it's currently kotlin/kotlin/unit/test) but if you Alt Enter or click the light bulb icon, it'll offer to move it to com/example/coolapps for you

  • Related