这里1.6 换成1.8的才能用
![](https://img.haomeiwen.com/i3671684/d29dc4ea99e78c07.png)
然后
build.gradle
添加依赖
implementation 'androidx.core:core-ktx:1.3.2'
咳咳如果还报错,这个也加上
kotlinOptions { jvmTarget = 1.8}
ok
这里1.6 换成1.8的才能用
build.gradle
添加依赖
implementation 'androidx.core:core-ktx:1.3.2'
咳咳如果还报错,这个也加上
kotlinOptions { jvmTarget = 1.8}
ok
本文标题:学习kotlin过程中解决无法使用sp.edit{}语法糖问题
本文链接:https://www.haomeiwen.com/subject/fqvpmktx.html
网友评论