Android Studio 3.6 中的 Gradle 同步失败导致类型代码无效:85
问题描述:
我刚刚将我的 Android Studio 从版本 3.5.3 更新到 3.6,现在我打开任何项目我看到这个错误并且 gradle 不同步
I just update my Android Studio from version 3.5.3 to 3.6, now I open any project I see this error and gradle doesn't sync
答
我遇到了同样的问题.我通过更改我使用的 JDK 版本(即 JDK 13)解决了这个问题.
I was having the same issue. I solved it by changing the JDK version I was using which was JDK 13.
- 转到文件 -> 项目结构.
- 在左侧,点击SDK 位置,然后转到JDK 位置.
- 将其更改为 Android Studio 附带的嵌入式 JDK.
- 点击确定.
- Go to File -> Project Structure.
- On the left side, click on SDK Location and go to JDK Location.
- Change it to the Embedded JDK that comes with Android Studio.
- Click on OK.