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.

Antlr dependency clashes with Databinding plugin.

See original GitHub issue

When you use the databinding plugin with sqldelight you’ll get an exception like:

java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID aadb8d7e-aeef-4415-ad2b-8204d6cf042e (expected ab35191a-1603-487e-b75a-479b831eaf6d or a legacy UUID).

This is because it uses com.tunnelvisionlabs:antlr4 instead of org.antlr:antlr4. These both ship the same classes in the same package but are incompatible on the same classpath.

An issue has been filed with Google to switch at http://b.android.com/200925

Until a new android plugin is released, the following workaround can (maybe?) be used:

buildscript {
  configurations.all {
    resolutionStrategy {
      dependencySubstitution {
        substitute module('com.tunnelvisionlabs:antlr4') with module('org.antlr:antlr4')
      }
    }
  }
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

0reactions
MisterSpicycommented, Jul 18, 2016

Thanks Alec - theres something messed up with the project properties with autovalue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Antlr dependency clashes with Databinding plugin. · Issue #123
When you use the databinding plugin with sqldelight you'll get an exception like: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; ...
Read more >
ANTLR Tool version mismatch with Room build error
It seems that it is known issue with data binding and room mismatch from ... This plugin allows us to jarjar dependencies that...
Read more >
Android faild build the project (Caused by: java.lang ...
The problem is that this breaks Gradle's use with the ANTLR4 plugin. A work around is to install the antlr4 utility in your...
Read more >
Room - Android Developers
Dependencies for Room include testing Room migrations and Room RxJava ... its ANTLR dependency with the annotation processor to avoid version conflicts with ......
Read more >
Gradle 6.0-rc-1 Release Notes
For Gradle plugin authors, we've added new APIs to make it easier to ... and resolve implementation conflicts between mutually exclusive dependencies.
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