function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raymond MuiselaarRaymond Muiselaar 

okhttp3

Hi,

After adding the snap-in sdk to the android project and trying to run the application I receive the following error.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okhttp3/internal/ws/RealWebSocket$1.class
Project was cleaned, cache invalidated but with no result.
Android project is part of a solution using react-native.
Best Answer chosen by Raymond Muiselaar
Steve ThistleSteve Thistle
Hi Raymond,

It sounds like the okhttp dependency is being included twice. You should be able to exclude the conflicting dependency to resolve the issue.

compile('com.salesforce.service:servicesdk:208.0.0') {
   exclude group: 'com.squareup.okhttp3',module: 'okhttp'
}

In the future consider posting your snapins questions on the google+ page linked below. It is maintained and monitored by the snapins team. 

https://plus.google.com/u/0/communities/104189600084591024148/stream/2cb9f7c2-1953-40f1-b94b-734ab703ca58

All Answers

Steve ThistleSteve Thistle
Hi Raymond,

It sounds like the okhttp dependency is being included twice. You should be able to exclude the conflicting dependency to resolve the issue.

compile('com.salesforce.service:servicesdk:208.0.0') {
   exclude group: 'com.squareup.okhttp3',module: 'okhttp'
}

In the future consider posting your snapins questions on the google+ page linked below. It is maintained and monitored by the snapins team. 

https://plus.google.com/u/0/communities/104189600084591024148/stream/2cb9f7c2-1953-40f1-b94b-734ab703ca58
This was selected as the best answer
Raymond MuiselaarRaymond Muiselaar
Hi Steve, 

Thanks a lot!
Previously I was only excluding the group, adding the module part made it 'magically' work.
And also thanks for your google+ page link.