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

Incompatibility with nativescript-plugin-firebase #81

Closed
hettiger opened this Issue Oct 18, 2017 · 12 comments

Comments

Projects
None yet
5 participants
@hettiger
Copy link
Contributor

hettiger commented Oct 18, 2017

There's a version conflict between nativescript-geolocation and nativescript-plugin-firebase.

As of

compile "com.google.android.gms:play-services-location:11.4.0"

nativescript-geolocation wants Google Play Services 11.4.0 but nativescript-plugin-firebase forces me to pin to version 11.2.2.

Is version 11.4.0 actually really required for this plugin to work or can you just pin to 11.2.2 as well? I think this is a issue for many people because nativescript-plugin-firebase is quite an important plugin... If not, what could I do about it? I really would like to be able using both of these plugins together in one app.

Here's the original error message I get after installing the nativescript-geolocation plugin and trying to build for Android.

FAILURE: Build failed with an exception.

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

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.4.0.

@hettiger

This comment has been minimized.

Copy link
Contributor Author

hettiger commented Oct 18, 2017

I can confirm that enableLocationRequest does work using 11.2.2. I forked this repo and repackaged the plugin with a pinned version of 11.2.2 as a workaround which does work for me so far.

@DimitarTachev

This comment has been minimized.

Copy link
Contributor

DimitarTachev commented Oct 18, 2017

Hi @hettiger,

Thanks for reporting this incompatibility.

The firebase plugin supports a custom Google Play Services version. Check here.

In other words, you could set:

android {  
  // other stuff here

  project.ext {
    googlePlayServicesVersion = "11.4.0"
  }
}

in your app/App_Resources/Android/app.gradle.

We should introduce the same flexible version support in the next version of the geolocation plugin. It should be the same as the one here combined with the README section.

If the firebase plugin is not OK with the 11.4.0 version, and you try the above-mentioned approach in your geolocation fork allowing you to set the googlePlayServicesVersion property to 11.2.2, a pull request will be highly appreciated.

@hettiger

This comment has been minimized.

Copy link
Contributor Author

hettiger commented Oct 18, 2017

@DimitarTachev Thank you, I've opened a Pull Request. (nativescript-plugin-firebase is not compatible with 11.4.0)

@jlooper

This comment has been minimized.

Copy link

jlooper commented Oct 18, 2017

This contribution has earned a badge of distinction! Well done!

contrib

@hettiger

This comment has been minimized.

Copy link
Contributor Author

hettiger commented Oct 18, 2017

Thank you @jlooper very much appreciate it :-)

@DimitarTachev

This comment has been minimized.

Copy link
Contributor

DimitarTachev commented Oct 20, 2017

@hettiger The changes were published and available in v4.2.0

@echosalik

This comment has been minimized.

Copy link

echosalik commented Apr 26, 2018

Hi I am having the same problem. But no matter what version I select it gives me an error to update to that version (which it is already on). How can I solve that?

@hettiger

This comment has been minimized.

Copy link
Contributor Author

hettiger commented Apr 26, 2018

@DragoTechInnovations try tns platform clean ios && tns platform clean android before you tns run when testing your changes. If that doesn't help, share a repo here that I can simply clone and that does reproduce the issue. I'll have a look at it when I get the chance to.

@echosalik

This comment has been minimized.

Copy link

echosalik commented Apr 26, 2018

I did something else. I force changed the version from include.gradle in geolocation. That solved the problem. Probably not the best way but it works now.

@hettiger

This comment has been minimized.

Copy link
Contributor Author

hettiger commented Apr 26, 2018

@DragoTechInnovations This should not be necessary but if it doesn't bother you that's fine to me.

@hettiger

This comment has been minimized.

Copy link
Contributor Author

hettiger commented Apr 26, 2018

@DragoTechInnovations I've just upgraded my app to {NS} 4. I had the same error too. The fix was as simple as following these instructions: https://github.com/EddyVerbruggen/nativescript-plugin-firebase#includegradle-failed-to-apply-plugin--for-input-string-

"nativescript-plugin-firebase": "^5.3.0", requires you to set something like this.

  project.ext {
    googlePlayServicesVersion = "12.0.1"
    supportVersion = "26.0.0"
  }

nativescript-geolocation will pick up that version too and work just fine. Give it a try. It's a much better approach than modifying node_modules contents.

@lin-brian-l

This comment has been minimized.

Copy link

lin-brian-l commented May 8, 2018

I've been having the same problem and @hettiger's solution helped me resolve the version conflict error, but I then ran into this error:

Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0) from [com.android.support:design:26.0.0] AndroidManifest.xml:28:13-35
        is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
        Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.

As per this SO post, I changed my supportVersion in project.ext from 26.0.0 => 26.1.0 and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment