Kotlin 编译报 Cannot access ‘java.io.Serializable‘ which is a supertype of ‘kotlin.String‘.

完整build错误:Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies

注意看最后一句话:Check your module classpath for missing or conflicting dependencies,我们可以在通过File -> Project Structure-> Modules ,发现当前项目中module不可用,修改成创建项目指定sdk就可以了

Kotlin 编译报 Cannot access ‘java.io.Serializable‘ which is a supertype of ‘kotlin.String‘._第1张图片Kotlin 编译报 Cannot access ‘java.io.Serializable‘ which is a supertype of ‘kotlin.String‘._第2张图片

原因:下面是改变之前Modules设置,

Kotlin 编译报 Cannot access ‘java.io.Serializable‘ which is a supertype of ‘kotlin.String‘._第3张图片

 Kotlin 编译报 Cannot access ‘java.io.Serializable‘ which is a supertype of ‘kotlin.String‘._第4张图片

 

你可能感兴趣的:(java,kotlin)