Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppsFlyerSDK/PhoneGap conflict with cordova-plugin-google-analytics #15

Closed
nskazki opened this issue Apr 5, 2016 · 9 comments
Closed

Comments

@nskazki
Copy link

nskazki commented Apr 5, 2016

Since AppsFlyerSDK/PhoneGap are disabled issues, I'm writing here.

If you install a combination of two plugins: cordova-plugin-google-analytics and AppsFlyerSDK/PhoneGap - the assembly of the project fails. But assembly is performed separately.

Project example for this issue: https://github.com/nskazki/ionic-app-issue-example

@nskazki
Copy link
Author

nskazki commented Apr 5, 2016

google-analytics-plugin issue: danwilson/google-analytics-plugin#212

@nskazki
Copy link
Author

nskazki commented Apr 6, 2016

related issue: https://github.com/intercom/intercom-cordova/issues/14

TL;dr
google-play-service: THIS PLUGIN IS DEPRECATED!!! Plugins should use framework tags instead.
Because of it you need replace the hardcoded google-play-services file on the build.gradle instruction

@golts
Copy link
Contributor

golts commented Apr 6, 2016

@nskazki Thanks,
We are going to release a new phone gap version soon, including a new google play services.

@golts golts closed this as completed Apr 6, 2016
@nskazki
Copy link
Author

nskazki commented Apr 6, 2016

Thanks, roughly when the new version will be released?

@golts
Copy link
Contributor

golts commented Apr 6, 2016

By the end of the week.

@nskazki
Copy link
Author

nskazki commented Apr 6, 2016

Excellent, thanks again.

@nskazki
Copy link
Author

nskazki commented Apr 8, 2016

Hello.
I try to do assembly with new version of your plugin, but it again failed .
Can you help me?

$ git clone [email protected]:nskazki/ionic-app-base.git
$ cd ionic-app-base
$ cat package.json | sed s/310b91c30c643168e1144ea7dd0153a790b476b3/f0e121946f5376dd39e64edd62b3629fca56d5c1/ | tee package.json
git diff
diff --git a/package.json b/package.json
index 218d661..f25de97 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
   "cordovaPlugins": [
     "cordova-plugin-google-analytics@~0.8.1",
     {
-      "locator": "https://github.com/AppsFlyerSDK/PhoneGap.git#310b91c30c643168e1144ea7dd0153a790b476b3"
+      "locator": "https://github.com/AppsFlyerSDK/PhoneGap.git#f0e121946f5376dd39e64edd62b3629fca56d5c1"
     }
   ],
   "cordovaPlatforms": [
$ rm -rf platforms/
$ rm -rf plugins/
$ ionic state restore
Attempting to restore your Ionic application from package.json

Restoring Platforms

cordova platform add android

Restore platforms is complete

Restoring Plugins

cordova plugin add cordova-plugin-google-analytics@~0.8.1
cordova plugin add https://github.com/AppsFlyerSDK/PhoneGap.git#f0e121946f5376dd39e64edd62b3629fca56d5c1 
Restore plugins is complete

Ionic state restore completed
$ ionic build android
Running command: /home/nskazki/node.js/claritasmind-work-projects/ionic-app-base/hooks/after_prepare/010_add_platform_class.js /home/nskazki/node.js/claritasmind-work-projects/ionic-app-base
add to body class: platform-android
ANDROID_HOME=/home/nskazki/Загрузки/android-sdk-linux
JAVA_HOME=/home/nskazki/Загрузки/jdk1.7.0_79
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
....
....
....
:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:compileDebugNdk UP-TO-DATE
:compileDebugSources
:transformClassesWithDexForDebug

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$Info;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)


 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/nskazki/Загрузки/jdk1.7.0_79/bin/java'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 39.417 secs
Error: Error code 1 for command: /home/nskazki/node.js/claritasmind-work-projects/ionic-app-base/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/nskazki/node.js/claritasmind-work-projects/ionic-app-base/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

@golts
Copy link
Contributor

golts commented Apr 11, 2016

@nskazki I've opened the issues on the phone gap repo, please use that from now on..
Regarding your issue:
The current version of google analytics is known to be problematic with additional plugins, as viewed here

danwilson/google-analytics-plugin#123

A possible fix is to revert to older version of google analytics which is compatible with our cordova plugin
cordova plugin add [email protected]

@athlonUA
Copy link

I have the same problem with [email protected] When i installed [email protected] the problem is gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants