mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 918 forks source link

Incompatibilty cordova-plugin-googlemaps - phonegap-plugin-push #2798

Closed u01ser closed 4 years ago

u01ser commented 4 years ago

When i use "cordova-plugin-googlemaps" and "phonegap-plugin-push" plugins and i tried to open a project on android studio:

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-messaging@{strictly 17.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-location@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@{strictly 16.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-basement@{strictly 16.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-base@{strictly 16.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-iid@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-location@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-maps@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.+
-- Project 'app' depends onto com.google.android.gms:play-services-stats@{strictly 15.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-common@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@{strictly 16.0.0}

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your build.gradle file.

I read a lot of documentation on internet, and i understand that the problem is because the plugins uses different versions, but i dont know how can i fix it.

Thanks for all.

wf9a5m75 commented 4 years ago

You can specify the version of the Google Play Services for this plugin using <preference name="GOOGLE_MAPS_PLAY_SERVICES_VERSION" value="16.1.0" /> in config.xml file

u01ser commented 4 years ago

I tried with your recomendation:

In your documentation you told about 16.0.1 (https://github.com/mapsplugin/cordova-plugin-googlemaps) and then I changed to:

And the error is:

ERROR: Failed to resolve: com.google.android.gms:play-services-maps:16.0.1 Show in Project Structure dialog Affected Modules: app

ERROR: Failed to resolve: com.google.android.gms:play-services-location:16.0.1 Show in Project Structure dialog Affected Modules: app

At the end, i test with:

And Android studio dont show errors, but i dont know if the app will be ok

What do you think?

wf9a5m75 commented 4 years ago

What version do you use of this plugin ? (Please provide enough information in advance)

u01ser commented 4 years ago

Sorry. I use the las versions of all plugins.

I uploaded the project files to: https://github.com/u01ser/test-pushandmap

The only way for everything works that i found is: <preference name="GOOGLE_MAPS_PLAY_SERVICES_VERSION" value="15.0.1" />

I dont know if this is the best way for your plugin.

Thanks for all!

wf9a5m75 commented 4 years ago

15.0.1 is OK, if you don't use Panorama class.

wf9a5m75 commented 4 years ago

I don't know other developer's plugin details, but I was able to build with:

FCM_VERSION = 20.2.1 and GOOGLE_MAPS_PLAY_SERVICES_VERSION = 16.0.0

wf9a5m75 commented 4 years ago

More further, please ask to the phonegap-plugin-push developer, not me.

u01ser commented 4 years ago

I don't know other developer's plugin details, but I was able to build with:

FCM_VERSION = 20.2.1 and GOOGLE_MAPS_PLAY_SERVICES_VERSION = 16.0.0

Not work for me.

I put in the config.xml "" and "". And in the package.json i have "FCM_VERSION": "20.2.1" but it doesn't work for me.

Can you tell me how do you make it work?

More further, please ask to the phonegap-plugin-push developer, not me.

You are absolutely right, and I appreciate your answers a lot. I think you are a good developer and good person. I didn't know the problem was on the other plugin.

Thanks for all!

wf9a5m75 commented 4 years ago

Sorry, but I have no enough to help your problem until the end. Please try and try. Basically if you don't "street view", "15.1" is enough.

Conflicting the versions of the libraries is the responsibility of the app developer

spinninghamster commented 4 years ago

I have the same problem and was just able to build using this:

https://github.com/phonegap/phonegap-plugin-push/issues/2902

Try it and let me know. I haven't found any bugs or downsides yet. Will report if I find any!