0

Im Using Android Studio 3.0.1, the project uses SDK Version 26. I try to pull messages from Google Cloud PubSub Module using the library 'grpc-pubsub-v1' adding in the app build.gradle the line:

compile ('com.google.api.grpc:grpc-pubsub-v1:0.0.2')

When the gradle sync the next error appear:

Error:Execution failed for task':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Maybe the version of the library is not compatible with the version of SDK, Gradle or other thing, also, adding the line 'multiDexEnabled true' dont fix the problem, the gradle version is 3.0.1.

Which is the correct library to use, or how to find it?

1 Answers1

0

As you are using gradle version is 3.0.1, you need to change compile to implementation as shown in this gradle document. It is a change that was done on the version 3.0.

Nathan Nasser
  • 1,008
  • 7
  • 18