在运作良好之前,现在无法运作
我使用了以下插件:
ionic插件添加cordova-plugin-googleplus --variable REVERSED_CLIENT_ID = myreversedclientid npm install --save @ ionic-native / google-plus
登录代码很简单,如以下说明所示:
this.googlePlus.login({})
.then(res => console.log(res))
.catch(err => console.error(err));
离子:
离子(离子CLI):4.1.2 离子框架:离子角3.9.2 @ ionic / app-scripts:1.3.1科尔多瓦:
cordova(Cordova CLI):8.1.2(cordova-lib@8.1.1) Cordova平台:Android 7.1.4 Cordova插件:cordova-plugin-ionic-keyboard 2.1.2,cordova-plugin-ionic-webview 2.0.2(和其他34个插件)
系统:
Android SDK工具:26.1.1(/ Volumes / mac_data / Android / sdk) ios部署:2.0.0 NodeJS:v8.11.3(/ usr / local / bin / node) npm:5.6.0 操作系统:macOS Sierra Xcode:Xcode 9.2 Build 9C40b
科尔多瓦版本7.1.0
Ionic Native GooglePlus 5.3.0
“ @ ionic-native / google-plus”:“ ^ 4.12.0”, cordova-plugin-googleplus 5.3.0
答案 0 :(得分:2)
尝试一下:
将cordova-plugin-googleplus降级为^ 5.2.1,
ionic cordova plugin remove cordova-plugin-googleplus
npm uninstall --save @ionic-native/google-plus
第二
cordova plugin add cordova-plugin-googleplus@5.2.1 --variable REVERSED_CLIENT_ID=YOUR_CLIENT_ID
npm install @ionic-native/google-plus
答案 1 :(得分:1)
这发生在我的 Playstore 版本上。我们需要在此处获取自动生成的 SHA1 密钥并将其放在 Firebase Project Settings --> Fingerprint
像这样获取自动生成的 SHA1 密钥:
答案 2 :(得分:0)
检查SHA1证书,在将您的应用程序推送到Google Play商店的过程中,SHA1是Google在最新更新中自动生成的。 要解决此问题,您需要每次使用自动生成的SHA1并在您的Google帐户中使用此SHA1证书进行配置。
答案 3 :(得分:0)
我已经解决了删除和读取android平台的问题,我也使用了android平台7.1.4和cordova 8(在win10下)。
但是请注意,根据我的经验,这样做可能会引起其他与插件兼容性有关的问题。
当前,我在使用Google plus和admob free插件(构建时出现“ desugar”错误)时遇到了兼容性问题,该问题在遇到相同问题(使用Google plus插件执行任何操作)时完全引发,然后删除并重新安装了android平台。
仅安装其中一个插件时,一切正常。
因此,如果您对命令平台rm / add感到满意,请尝试此解决方案。
-编辑
您可以尝试此解决方案,而无需在另一个目录中检出项目的任何风险:)