saperlipopette
saperlipopette

Reputation: 1693

Trouble installing phonegap plugin push with Ionic 2

I'm currently trying to develop an application with some plugins, here is the list :

com.googlemaps.ios 2.5.0 "Google Maps SDK for iOS"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-crop 0.3.1 "CropPlugin"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googlemaps 2.1.1 "cordova-plugin-googlemaps"
cordova-plugin-ionic-webview 1.1.15 "cordova-plugin-ionic-webview"
cordova-plugin-screen-orientation 2.0.1 "Screen Orientation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.4-dev "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-x-socialsharing 5.2.1 "SocialSharing"
es6-promise-plugin 4.1.0 "Promise"
info.protonet.imageresizer 0.1.1 "Image Resizer"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 2.1.0 "PushPlugin"

Since I installed the PushPlugin, I have no more possibility to build the app, I have the following error :

A problem occurred evaluating root project 'android'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
   > For input string: "+"

I tried to edit project.properties, build.gradle.. From what i read on internet, this is a conflict version between different google based plugins. I can't figure out how to make these plugins work together.. Thank you in advance for help !

Upvotes: 0

Views: 96

Answers (1)

Anoop M Maddasseri
Anoop M Maddasseri

Reputation: 10569

Solve it as follows:

Go to platform-> android -> project.properties and assign a version number for com.google.android.gms:play-services-{}:11.0.1 ( Match all play service dependency version )

If you recompile now, it will complain about google-services.json file. You can create and download it from here. Save that file in the root folder of your ionic project.

It should recompile now without errors. You read through this git thread.

Upvotes: 1

Related Questions