1
我遇到了ionic2/cordova(再次)的問題。我不知道如何匹配以下版本: com.google.android.gms
,cordova-plugin-firebase
和phonegap plugin push
。IONIC 2,如何匹配Google服務,PushNotifications和Firebase的版本
在編譯的恩,我有以下錯誤:
BUILD FAILED
Total time: 4.038 secs
Error: /home/thor/Projects/App_CDP/platforms/android/gradlew: Command failed with exit code 1 Error output: /home/thor/Projects/App_CDP/platforms/android/src/com/adobe/phonegap/push/FCMService.java:71: error: cannot access zza
String from = message.getFrom();
^
class file for com.google.android.gms.common.internal.safeparcel.zza not found
我的理解,這是因爲谷歌的服務和PushNotifications之間的版本差別。 我有以下的依賴關係gradle.build:
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile(project(path: "CordovaLib", configuration: "debug"))
releaseCompile(project(path: "CordovaLib", configuration: "release"))
compile "com.facebook.android:facebook-android-sdk:4.+"
compile "com.google.android.gms:play-services-maps:11.+"
compile "com.google.android.gms:play-services-location:11.+"
compile "com.android.support:support-v13:25.1.0"
compile "me.leolin:ShortcutBadger:[email protected]"
compile "com.google.firebase:firebase-messaging:11.0.1"
// SUB-PROJECT DEPENDENCIES END
}
的問題是,這個文件是自動生成的,所以我不能改變它,科爾多瓦插件是一種痛苦。
這裏是我的插件列表:
$ ionic cordova plugins
> cordova plugin ls
✔ Running command - done!
com.googlemaps.ios 2.4.0 "Google Maps SDK for iOS"
cordova-android-play-services-gradle-release 1.1.1 "cordova-android-play-
services-gradle-release"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-googlemaps 1.4.5 "cordova-googlemaps-plugin"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 2.0.0 "PushPlugin"
這裏是我的版本:
$ ionic -v
3.13.1
$ cordova -v
7.1.0
我保存問題,任何人都可以幫忙。 – Kamlesh