Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Android build fails when using com.cmackay.plugins.googleanalytics@1.0.2 #1879

Closed
jvjvjv opened this issue Jul 30, 2017 · 6 comments
Closed

Comments

@jvjvjv
Copy link

jvjvjv commented Jul 30, 2017

This issue should be deleted, as my issue is with com.mackay.plugins.googleanalytics plugin. Current build errors out with the message below. Warning to users until this is updated, you may run into the same headache I had.

Error: /Development/Projects/PluginCompatTest/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.0.1.

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

I'll close the ticket once I see the offending plugin updated, if this post is still up.

@jvjvjv jvjvjv changed the title Android build fails when using other Android build fails when using other Google Plugins Jul 30, 2017
@jvjvjv jvjvjv changed the title Android build fails when using other Google Plugins Android build fails when using com.cmackay.plugins.googleanalytics@1.0.2 Jul 30, 2017
@jvjvjv
Copy link
Author

jvjvjv commented Jul 30, 2017

NB: this issue occurs when you are using the new 2.0.0 branches. I see it on @2.0.0-rc5.

@jvjvjv
Copy link
Author

jvjvjv commented Jul 30, 2017

NB: and dan wilson's google analytics plugin, too. 😞

@jvjvjv
Copy link
Author

jvjvjv commented Jul 30, 2017

Oh dear. It's like I'm having a conversation with myself in this issue, instead of just letting others talk. I'm wondering, is it every other plugin that this doesn't seem to work with that's a problem? Or is it this plugin that doesn't play nice with the others, that's the problem? I think this is a question to pose both to the community as well as this plugin's authors. Who should fix the problem?

@fredgalvao
Copy link
Collaborator

Considering you're speaking about https://github.com/cmackay/google-analytics-plugin, check it's plugin.xml and look for this line, where it specifices:
<framework src="com.google.android.gms:play-services-analytics:+" />

That :+ means: "I want the newest version, whatever it is". That means there's a high chance it'll grab different versions at different moments, and it has been proven that it can even grab alpha versions on some occasions, which is dangerous to say the least.

Dan Wilson's plugin is just the same case: <framework src="com.google.android.gms:play-services-analytics:+" />.

Now, if you look at this own plugin's plugin.xml and push.gradle, you'll see we specify all versions deterministicly, so that no surprises occur.

There are arguments in favor and against both approaches, but my personal experience in making this plugin coexist with a group of like 4 other plugins, having open versions like :+ is the most dangerous of all approaches.

So, potential fixes are:

  • try to convince us to change it to :+
  • try to convince that other plugin's author to change it to a specific version that can coexist with most up-to-date plugins and not grab alpha versions

I'm open for discussions and receptive to arguments, but I have a list of other 5 issues between plugin compatibilities to back me up ;) (most of the discussion originated here).

You can force a version to all dependent projects with a solution similar to what @dpa99c did with the https://github.com/dpa99c/cordova-android-play-services-gradle-release plugin. That plugin was born from the discussion I linked above, and it's known to work when some of the plugin authors involved can't reach an agreement.

@macdonst
Copy link
Member

macdonst commented Aug 1, 2017

@jvjvjv this is a duplicate of #1718. The problem is the application of the:

apply plugin: com.google.gms.googleservices.GoogleServicesPlugin

which forces everyone to use the same version of google libraries.

@macdonst macdonst marked this as a duplicate of #1718 Aug 1, 2017
@macdonst macdonst closed this as completed Aug 1, 2017
@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants