google-analytics-plugin icon indicating copy to clipboard operation
google-analytics-plugin copied to clipboard

Conflict with phonegap-plugin-push

Open gustter opened this issue 9 years ago • 8 comments

I'm using PGB platform.

When I compile my App using phonegap-plugin-push and google-analytics-plugin an error occurs (only Android):

  • What went wrong: Execution failed for task ':transformClassesWithDexForArmv7Debug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/actions/ReserveIntents;

Any idea?

Thanks!

gustter avatar Jul 03 '17 01:07 gustter

please check comment issue #178

victorsosa avatar Jul 03 '17 01:07 victorsosa

I see those references are a bit old.

I'm using:

I have tried the various suggestions but they do not work.

Do you know if both plugins can work together? That is, if there is any antecedent known.

Thanks.

gustter avatar Jul 03 '17 02:07 gustter

We had the same problem, but with onesignal push plugin. We solved it, by installing the Google Analytics plugin previously and then the onesignal push plugin later. try it out

davgc avatar Jul 05 '17 10:07 davgc

I am getting the same error. Error: /home/abdullaku/Desktop/kabinger_Cordova/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

Where: Script '/home/abdullaku/Desktop/kabinger_Cordova/platforms/android/phonegap-plugin-push/kabinger-push.gradle' line: 38

What went wrong: A problem occurred evaluating root project 'android'.

Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] For input string: "+" Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. In my Project added push plugin and google analytics plugin..i tried all the above solution but that not working,

abducbk avatar Jul 07 '17 03:07 abducbk

I solve the problem with "Multiple dex files define" using this plugin: cordova-android-play-services-gradle-release

AKosmachyov avatar Jul 27 '17 10:07 AKosmachyov

@AKosmachyov Thanks for the info.

victorsosa avatar Jul 27 '17 12:07 victorsosa

@abducbk Your problem seems to be different as it was indicated by @gustter

To solve your individual problem, take a look at this resource https://github.com/cmackay/google-analytics-plugin/issues/77

To make the story short:

  • remove android platform
  • change playservice-version in "plugins\cordova-plugin-google-analytics\plugin.xml" from "+" to match your desired one (eg. "11.0.1")
  • add android platform again
  • build

Hope it helps...

phonic avatar Aug 08 '17 08:08 phonic

fixed on v1.8.4

victorsosa avatar Jul 24 '18 19:07 victorsosa