Android Studio & please select a
2018-06-29 本文已影响0人
南窗云
问题
BUG:好好的代码,忽然无法运行了
![](https://img.haomeiwen.com/i2849271/18760e88f282aa0e.png)
点击运行,会弹出错误提示框
![](https://img.haomeiwen.com/i2849271/68f7c9013adde300.png)
我的解决方案
将 Kotlin版本 从 1.2.50 降为 1.2.30,就解决了
ext.kotlin_version = '1.2.50'
// 更改为
ext.kotlin_version = '1.2.30'
I was having this problem on all versions of AS 3.0+. Syncing with gradle did not solve the problem for me. The solution from András Klöczl was the only thing that would allow me to get some coding done. The problem was, anytime I had to do a gradle sync, the problem came back. So I had to go through that process any time I wanted to make a change in my
build.gradle
. What ended up working for me was to downgrade my kotlin version from1.2.40
to1.2.30
其他解决方案(查到的,但是对我的项目没有用)
查到的原因是Android Studio异常关闭,使得某些配置文件损坏,需要更新SDK以恢复被损坏的文件
![](https://img.haomeiwen.com/i2849271/9cfae3e3daf28a3c.png)
![](https://img.haomeiwen.com/i2849271/59680ddc5eed3fdd.png)
![](https://img.haomeiwen.com/i2849271/575531d62eeba7bd.png)
![](https://img.haomeiwen.com/i2849271/dcde7a632b153f48.png)