I`m trying to add boofcv-core library to my Android project.
boofcv-android works fine but boofcv-core generates the following error:
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.17.3.jar (com.google.protobuf:protobuf-java:3.17.3) and protobuf-javalite-3.14.0.jar (com.google.protobuf:protobuf-javalite:3.14.0)...
The code at build.gradle:
...
configurations {
// compile.exclude group: 'com.google.protobuf' // when uncommented, causes other errors
all*.exclude group: "xmlpull", module: "xmlpull"
all*.exclude group: "org.apache.commons", module: "commons-compress"
all*.exclude group: "com.thoughtworks.xstream", module: "commons-compress"
}
dependencies {
['boofcv-android', 'boofcv-core'].each {
String a -> implementation group: 'org.boofcv', name: a, version: '0.37'
}
...