Cause: invalid type code: 1C for android studio gradle
This is an issue with the JDK version being too recent, as shown in this line:
CsvFileTypeOverrider: net/seesharpsoft/intellij/plugins/csv/CsvFileTypeOverrider has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I had a similar bug where Gradle sync died immediately with the Cause: invalid type code: 1C
error. Switching the JDK from OpenJDK 14 I installed to the integrated JDK that comes bundled with Android Studio fixed the issue.
To switch the JDK version, go to File > Project Structure, select "SDK Location" on the left sidebar, and under "JDK Location" select the dropdown arrow and then select Embedded JDK: C:\Users\user\...
If you using Android Studio 4.0 or up and having Errors like below
Cause: invalid type code: 17
Cause: invalid type code: fe
Cause: invalid type code: 13
Cause: invalid type code: 85
Or
Its says that something wrong with JDK then Follow below steps to resolve the error.
Step 1: First delete .gradle and .idea folder from project directory and restart Android Studio. Make sure it's gone from recycle bin.
Step 2: Go to Project Structure
Step 3: Select SDK Location from the left panel on Project Structure window.
Step 4: Go to JDK Location and click on down arrow then select the jre instead of jdk
C:\Program Files\Android\Android Studio\jre
And it will Solve the errors. Rebuild the project
Note: jre come with the android studio 4 installation not sure about the older version.
This solution work for me.