【问题标题】:Ionic 3, Googleplus plugin and firebase plugin playservices conflict problem - August 2019Ionic 3、Googleplus 插件和 firebase 插件 playservices 冲突问题 - 2019 年 8 月
【发布时间】:2019-08-16 14:36:02
【问题描述】:

我有使用 firebase 和 google plus 插件的 ionic 3 应用程序,当我同时安装插件和调试 android 平台时,它给出了 processDebugResources 错误,在fire-base-plugin issues 中进行搜索后,我在 firebase 中进行了更改插件和 android 平台如下所示,然后我可以构建 android 平台,firebase 也运行良好,但 google plus 不再工作,没有任何错误或异常,只是等待承诺。谁能帮帮我?

我已将这些行添加到 firebase 插件

<framework src="com.google.android.gms:play-services-tagmanager:16+" />
<framework src="com.google.firebase:firebase-core:16.+" />
<framework src="com.google.firebase:firebase-messaging:17.+" />
<framework src="com.google.firebase:firebase-config:16.+" />
<framework src="com.google.firebase:firebase-perf:16.+" />

并在 plugins/cordova-plugin-firebase/src/android/build.gradle 中进行了这些更改

compile 'com.google.firebase:firebase-auth:16.+' 
compile 'com.google.firebase:firebase-iid:16.+'

我也将安卓平台gradle更改为

classpath 'com.google.gms:google-services:4.2.0' // google-services dependency from cordova-plugin-firebase

【问题讨论】:

  • 尝试更改此文件路径中的数字(只需尝试)/platforms/android/project.properties firebase-core:11.4.2/11.8.0 firebase-messaging:11.4.2/11.8。 0 firebase-config:11.4.2/11.8.0 firebase-perf:11.4.2/11.8.0 firebase-auth:11.4.2/11.8.0 firebase-iid:11.4.2/11.8.0
  • 谢谢 Anandh,当我将其更改为 11.8.0 时,它给了我调试错误,例如:app:compileDebugJavaWithJavac。 dpo 你有别的想法吗?
  • 用 11.4.2 试试
  • 在此处粘贴您的 android.properties 文件
  • target=android-27 android.library.reference.1=CordovaLib android.library.reference.2=app cordova-plugin-firebase/needion-build.gradle com.google.android.gms: play-services-tagmanager:+ com.google.firebase:firebase-core:11.4.2 com.google.firebase:firebase-messaging:11.4.2 com.google.firebase:firebase-config:11.4.2 com.google。 firebase:firebase-perf:11.4.2 com.google.android.gms:play-services-auth:11.4.2 com.google.android.gms:play-services-identity:11.4.2 com.android.support:support -注释:27.+

标签: android firebase ionic3 cordova-plugins


【解决方案1】:

我是这样解决的:

ionic cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.************* --variable WEB_APPLICATION_CLIENT_ID=*************.apps.googleusercontent.com --variable PLAY_SERVICES_VERSION=15.0.1

示例代码:

var webClientId = '********.apps.googleusercontent.com';

this.googlePlus.login({
'webClientId': webClientId,
'offline': false
}).then.........

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-20
    • 1970-01-01
    • 2021-06-06
    • 2018-11-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多