简体   繁体   English

无法在Ionic 2上安装phonegap插件推送

[英]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 : 由于我安装了PushPlugin,因此无法再构建该应用程序,出现以下错误:

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. 我试图编辑project.properties,build.gradle。从网上阅读的内容来看,这是基于Google的不同插件之间的冲突版本。 I can't figure out how to make these plugins work together.. Thank you in advance for help ! 我不知道如何使这些插件协同工作。。在此先感谢您的帮助!

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 ) 转到平台-> android-> project.properties并为com.google.android.gms:play-services-{}:11.0.1分配一个版本号(匹配所有播放服务依赖版本)

If you recompile now, it will complain about google-services.json file. 如果您现在重新编译,它将抱怨google-services.json文件。 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. 您通读了这个git线程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM