On running the emulator getting this error: Cause: invalid type code: 1D

On running the emulator getting this error: Cause: invalid type code: 1D

最近我安装了 android studio,当我第一次 运行 这个应用程序时它 运行 没有任何错误但是现在,当我 运行 它时,它给出了错误,即

Cause: invalid type code: 1D

Executing tasks: [:app:assembleDebug] in project /home/dell/AndroidStudioProjects/disha





FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 95ms

请帮忙。

要解决此错误,请进行以下更改:

安装JavaSDK版本:14以上.

JDK下载link:https://www.oracle.com/java/technologies/javase-jdk14-downloads.html

并且在 gradle-wrapper.properties 中请使用等级 6.3 或更高版本。