Google Plus Plugin and Push Notification Plugin conflict on PhoneGap Build, Build failed

一曲冷凌霜 提交于 2019-12-11 11:14:47

问题


I need to use google plus plugin along with the push notification plugin
<plugin name="cordova-plugin-googleplus" source="npm" spec="5.2.1"></plugin>, but using both of them build gives error : Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] > For input string: "+"

When I use 5.3.0 of googleplus plugin then it works and build succeeds, but then on sending notifications a pop up appears in my mobile &saying App has stopped ...Close App.

UPDATE : config.xml

<?xml version='1.0' encoding='utf-8'?>

<widget id="com.phonegap.myapp1" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>My App1</name>
    <description>
       MyApp
    </description>


        <preference name="DisallowOverscroll" value="true" />
        <preference name="AndroidPersistentFileLocation" value="Compatibility" />
        <preference name="loadUrlTimeoutValue" value="700000" /> 
        <preference name="android-minSdkVersion" value="17" />



        <preference name='phonegap-version' value='cli-8.0.0' />

        <preference name='pgb-builder-version' value='2' />






        <hook src="scripts/cordova-google-services-version-gradle-fix.js" type="before_prepare" />



            <platform name="android">

                <framework src="com.google.android.gms:play-services-gcm:+" />

                <framework src="com.android.support:support-v4:+" />

            </platform>

THIS removes the conflict error but when sending NOTIFICATION and instead of the notification a dialog appears in my mobile which says App has stopped Close App

        <plugin name="cordova-plugin-googleplus" source="npm" spec="5.3.0"></plugin>  

so i am using this version which gives a nice notification

     <plugin name="cordova-plugin-googleplus" source="npm" spec="5.2.1"></plugin>    


        <platform name="android">   

            <resource-file src="app/google-services.json" target="app/google-services.json" />  

        </platform>     



         <plugin name="phonegap-plugin-push" spec="1.10.5">     
OR
      <plugin name="phonegap-plugin-push" spec="1.4.5">  
OR

    <plugin name="phonegap-plugin-push" spec="2.1.3"> 
            <param name="SENDER_ID" value="xxx" />
        </plugin>


            <content src="index.html" />    


    </widget> 

来源:https://stackoverflow.com/questions/50017635/google-plus-plugin-and-push-notification-plugin-conflict-on-phonegap-build-buil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!