question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android project: 1.0.0RC - Need gradle 6.1.1, does not work with 5.6.4

See original GitHub issue

Since upgrade from 0.20.0 to 1.0.0-RC along with Kotlin to 1.4.0 the application fails to build with multiple errors in ::sample:checkDebugDuplicateClasses task with messages like:

java.lang.RuntimeException: 
Duplicate class kotlinx.serialization.AbstractSerialFormat found in modules 
jetified-kotlinx-serialization-core-jvm-1.0.0-RC.jar (org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.0.0-RC) and 
jetified-kotlinx-serialization-core-jvm-1.0.0-RC.jar (org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC)

It seems the problem is actual with gradle 5.6.4 and a workaround by upgrading to 6.1.1 fixes the problem. However this bump of major gradle version may not be that easy in many cases. Is it intended or is it a bug? The need for gradle upgrade is not mentioned in migration guide explicitly.

To Reproduce A sample application using the library with kotlinx.serialization dependency.

  1. include the library to see build failure. Commit
  2. Update gradle to 6.1.1 - build passes. Commit

The library using serialization could be found in the same repository. Here is how the dependency is configured.

Environment

  • Kotlin version: 1.4.0
  • Library version: 1.0.0-RC
  • Kotlin platforms: JVM (Android)
  • Gradle version: 5.6.4/6.1.1
  • AGP 3.6.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
pdvriezecommented, Sep 27, 2020

For 1.0 release the maven coordinates were updated (along with many other parts of the api), so runtime no longer exists as a coordinate, but now is -core. -json provides the json format, but pulls in core transitively

2reactions
vorobeijcommented, Sep 1, 2020

I have this issue with Gradle 6.5 and 6.6.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Minimum supported Gradle version is 6.1.1. Current version is ...
I faced this error. so I added the line below to build.gradle(project) file , dependency part:.
Read more >
Upgrading your build from Gradle 6.x to the latest
Try to run the project and debug any errors using the Troubleshooting Guide. ... The migration can be performed per configuration and does...
Read more >
Android Gradle plugin release notes - Android Developers
The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to building Android...
Read more >
Gradle Docker Plugin User Guide & Examples - GitHub Pages
This plugin requires Gradle >= 5.2 to work properly. ... Managing a Docker Swarm and/or Stack is not supported.
Read more >
Spring Boot Gradle Plugin Reference Guide
Spring Boot's Gradle plugin requires Gradle 7.x (7.5 or later) and can ... Overriding versions may cause compatibility issues and should be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found