如何修复离线cordova构建Android谷歌服务插件? [英] how to fix ionic cordova build android for google service plugin?

查看:486
本文介绍了如何修复离线cordova构建Android谷歌服务插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了很多并尝试将问题缩短..我已经跟着在android.properties中更改版本但是它不起作用。

I have searched for this a lot and tried to short out the problem.. i have followed to change version also inside android.properties but it's not working.

当我做 ionic cordova build android 时会出现以下错误:

When i do ionic cordova build android it gives following error:

Script '/My-path-to/platforms/android/cordova-support-google-services/android-build.gradle' line: 16

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
   > For input string: "+"

这是我的android.properties:

Here is my android.properties :

target=android-26
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.gradle.include.1=cordova-plugin-firebase/android-build.gradle
cordova.system.library.1=com.google.gms:google-services:+
cordova.system.library.2=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.3=com.google.firebase:firebase-core:+
cordova.system.library.4=com.google.firebase:firebase-messaging:+
cordova.system.library.5=com.google.firebase:firebase-crash:+
cordova.system.library.6=com.google.firebase:firebase-config:+
cordova.system.library.7=com.google.firebase:firebase-perf:+
cordova.gradle.include.2=cordova-support-google-services/android-build.gradle
cordova.system.library.8=com.google.firebase:firebase-auth:11.6.+
cordova.gradle.include.3=cordova-plugin-googlemaps/android-tbxml-android.gradle
cordova.system.library.9=com.google.android.gms:play-services-maps:15.0.1
cordova.system.library.10=com.google.android.gms:play-services-location:15.0.1
cordova.system.library.11=com.android.support:support-core-utils:26.1.0

非常感谢任何帮助/建议..如果需要任何细节请告诉我..提前致谢。

Any help/suggetion would be very much appreciated..if need any detail please let me know.. Thanks in advance.

推荐答案

从firebase控制台获取GoogleService.json文件 - >项目概述 - >项目设置 - >您的应用程序 - > googleservice。 json按钮并将文件粘贴到yourapp / platfom / android /或yourapp / platfom / android / app /

get the GoogleService.json File from firebase console -> project overview -> project settings -> Your apps -> googleservice.json button and paste the file inside yourapp/platfom/android/ or yourapp/platfom/android/app/

这篇关于如何修复离线cordova构建Android谷歌服务插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆