Search code examples
android-studio-dolphin

Android Studio dolphin 2021.3.21 - app:l8DexDesugarLib FAILED -java.lang.IllegalStateException: This is not a JSON Array


I recently upgraded Android studio to Dolphin 2021.3.21 with following settings.

  1. kotlin G plugin:1.7.10
  2. com.android.tools:r8:3.3.75
  3. Android G plugin : 7.2.2

and using Java 11

When I rebuild my project it's failing and the reason is:

Task :app:l8DexDesugarLibQaDebug FAILED Warning: Human desugared library specification format version 200 mismatches the parser expected version (100). This is allowed and should happen only while extending the specifications. Error: java.lang.IllegalStateException: This is not a JSON Array. Human desugared library specification format version 200 mismatches the parser expected version (100). This is allowed and should happen only while extending the specifications.

java.lang.IllegalStateException: This is not a JSON Array.


Solution

  • I too had the same situation.

    If you are implementing the following two libraries, I solved it when I lowered the version as below.

    implementation 'androidx.appcompat:appcompat:1.5.1'

    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'