androidandroid-studioandroid-jetpackandroid-jetifier

Android Jet Pack Jetifier: Cause: invalid literal/lengths set


I am unable to make the APK build. This started happening after I downgraded from Windows 10 to Windows 7 on only one project as of now. Other projects are working fine. I tried to change Gradle class path version several times. I changed the Gradle wrapper versions as well.

Every time I get the following output:

Cause: invalid literal/lengths set.

I have also attached both build.gradle files with stacktrace file in the issue tracker:

Google Issue Tracker: My Issue

The log starts with: Failed to transform transport-runtime-2.2.1.aar and more. I was unable to find this error on Google.


MORE:

The following also produced sometimes:

Unable to load class 'butterknife.OnCheckedChanged'. Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

I tried stopping the gradle build and re-downloading the dependencies using the links provided above, but nothing worked.

I also uninstalled and re-installed Android Studio. That didn't work as well.


I have removed butterknife library, but there are more sets of errors there in the build. Please see the link to Google Issue Tracker post above.


Solution

  • I had to update the following libraries to fix. One coroutine library was corrupted, so I had to delete and update the file in the .gradle/ root path location:

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.5.0-alpha01'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'