Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] Gradle Sync Failed in Android Studio 3.6 Cause invalid type code :85

Posted on November 11, 2022 By

Solution 1 :

I was having the same issue. I solved it by changing the JDK version I was using which was JDK 13.

  1. Go to File -> Project Structure.
  2. On the left side, click on SDK Location and go to JDK Location.
  3. Change it to the Embedded JDK that comes with Android Studio.
  4. Click on OK.

Solution 2 :

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

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 FilesAndroidAndroid Studiojre

JDK Location

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.

Solution 3 :

I found out that some people might use Android 4.0 with Java 14 and Gradle 6.1.1 like me. And they are not supported for each other, so just update Gradle to 6.5.1; it will solve the problem. To update Gradle, click in the Android Studio tab: File -> Project Structure -> Project. Then, change the Gradle version to 6.5.1.

all_java_gradle_verion

Thanks, it was very helpfull!

READ  [FIXED] java - Can't find TextView in another View
Powered by Inline Related Posts

Solution 4 :

Here’s what I did to solve the issue with JDK 11 + Android 4.0.

  1. Follow Tran’s answer (https://stackoverflow.com/a/62967378/5359328) and upgrade to Gradle 6.5.1.
  2. Build project. It still shows the same error.
  3. Change JDK to 8 in Project Structure, build. It’s successful.
  4. Change JDK back to 11 in Project Structure, build. It’s successful again.

Problem :

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

enter image description here

Comments

Comment posted by bunkinet

I also had the same issues and this solution fixed it

Comment posted by rineez

Selecting the Embedded JRE fixed problem for me also; but isn’t this so counter intuitive. When Android Studio asks for JDK Location we users must give a JRE location? Otherwise it won’t work? And this is not considered a bug?

Comment posted by gumuruh

why must we move on to 6.5.1 if the previously (or yesterday the older version is still stable?) in which part that the error comes actually,… i mean there’s something working behind the scene that make this a force for us… 🙁

Android Tags:android-studio, gradle

Post navigation

Previous Post: [FIXED] Xamarin.forms – Trouble behaviour between ListView & keyboard
Next Post: [FIXED] android – two elements in linear layout are packed to center instead of to the sides

Related Posts

[FIXED] java – viewHolder.setItemClickListener() not working Android
[FIXED] Android 9 armeabi-v7 emulator Android
[FIXED] android – Huawei Mobile Service Development – Storage Service Doesn’t Exists Android
[FIXED] android – How to build and maven-publish a flutter aar? Android
[FIXED] android – type parameter T has incompatible upper bounds:view and tablayout Android
[FIXED] android – AndroidRuntime: FATAL EXCEPTION: androidmapsapi-ZoomTableManager, java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What color are dead flea eggs?
  • What is Indiana vine?
  • What’s the downside of a Chromebook?
  • Is phosphide the same as phosphorus?
  • Why do you need an S bend?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme