如何修复离线cordova构建Android谷歌服务插件?

时间:2018-06-14 06:51:46

标签: android ionic-framework cordova-plugins

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

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

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:

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

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

1 个答案:

答案 0 :(得分:0)

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