I'm trying to use the gcloud-java-datastore library in an Android app project. However, I keep running into the following error when trying to build:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: ... [one of several different classes]
I've tried excluding various dependencies (e.g. com.google.guava
) from gcloud-java-datastore (v0.2.8) in build.gradle to get it to compile. If I exclude com.google.api.grpc
, com.google.guava
, com.google.api-client
, and one of datastore-v1-protos
or protobuf-java
, I can get it to compile successfully. However, excluding either one of those last two dependencies breaks the core functionality of the library.
Is it even possible to use this library in Android? If so, what am I doing wrong?