Antlr dependency clashes with Databinding plugin.
See original GitHub issueWhen 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:
- Created 8 years ago
- Reactions:1
- Comments:25 (13 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2.2.0 alpha is available https://bintray.com/android/android-tools/com.android.tools.build.gradle/view
Thanks Alec - theres something messed up with the project properties with autovalue.