我在 IntelliJ IDEA 中遇到 compileKotlin 錯誤問題。嘗試更改以前的 jvm 或 java 版本,但仍然出現如圖所示的錯誤。誰能幫我解決這個問題。請各位...

uj5u.com熱心網友回復:
是否App.kt在頂部有這個?
package kotlin.kotlin.unit.test
Only the Kotlin standard library is allowed to use the 'kotlin' package如果你這樣做,你會得到那個錯誤 - 你的包名不能以kotlin.. com.example.coolapps如果您沒有自己的域,只需使用或其他東西。
如果你重命名它,Android Studio 會抱怨包名與檔案的位置不匹配(包需要匹配檔案夾結構 - 在它當前的路徑中查看kotlin/kotlin/unit/test)但是如果你 Alt Enter 或單擊燈泡圖示,它會com/example/coolapps幫你把它移到
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/392216.html
