Cordova构建失败的processDebugResources

时间:2017-08-19 14:51:28

标签: android cordova plugins

我正在尝试编译我的用于Android的cordova应用程序,但我收到了下一个错误:

Execution failed for task ':processDebugResources'. Error: more than one library with package name 'com.google.android.gms'

这是我的插件列表

com.pylonproducts.wifiwizard 0.2.11 "WifiWizard" cordova-google-play-services 25.0.0 "Google Play Services for Android" cordova-plugin-compat 1.1.0 "Compat" cordova-plugin-device 1.1.2 "Device" cordova-plugin-facebook4 1.9.1 "Facebook Connect" cordova-plugin-geolocation 2.4.3 "Geolocation" cordova-plugin-network-information 1.2.1 "Network Information" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-whitelist 1.2.2 "Whitelist" ionic-plugin-keyboard 2.2.1 "Keyboard" onesignal-cordova-plugin 2.1.2 "OneSignal Push Notifications"

只要我尝试使用'onesignal-cordova-plugin'和'cordova-google-play-serivces'进行编译,就会发生这种情况。

我尝试过更改build.gradle:

compile "com.google.android.gms:play-services-gcm:+"
compile "com.google.android.gms:play-services-location:+"

到此:

compile "com.google.android.gms:play-services-gcm:10.2+"
compile "com.google.android.gms:play-services-location:10.2+"

以及其他一些版本,但没有一个版本有效。

1 个答案:

答案 0 :(得分:0)

通过更改

解决了这个问题
onesignal-cordova-plugin 2.1.2 "OneSignal Push Notifications"

代表

onesignal-cordova-plugin-pgb-compat 1.13.1 "OneSignal Push Notifications PGB Compat"