More than one library with package name


#1

Hello everyone,
I’m new in ionic, I encountered an error when I execute Ionic run android,here is the error

Here are the plugins that I have added

com.google.playservices 21.0.1 "Google Play Services for Android"
com.ionic.keyboard 1.0.4 "Keyboard"
com.phonegap.plugins.facebookconnect 0.11.0 "Facebook Connect"
com.transistorsoft.cordova.background-geolocation 0.5.11 "BackgroundGeolocation"
cordova-plugin-camera 1.2.0 "Camera"
cordova-plugin-console 1.0.1 "Console"
cordova-plugin-device 1.0.1 "Device"
cordova-plugin-dialogs 1.1.1 "Notification"
cordova-plugin-file 2.1.0 "File"
cordova-plugin-file-transfer 1.2.1 "File Transfer"
cordova-plugin-geolocation 1.0.1 "Geolocation"
cordova-plugin-network-information 1.0.1 "Network Information"
cordova-plugin-splashscreen 2.1.0 "Splashscreen"
cordova-plugin-whitelist 1.0.0 "Whitelist"
de.appplant.cordova.plugin.email-composer 0.8.3dev "EmailComposer"
de.neofonie.cordova.plugin.nativeaudio 3.1.0 "Cordova Native Audio"
nl.x-services.plugins.googleplus 1.1.2 "Google+"
nl.x-services.plugins.socialsharing 4.3.19 "SocialSharing"
nl.x-services.plugins.toast 2.1.1 "Toast"
onesignal-cordova-plugin 1.9.0 “OneSignal Push Notifications”

and here my build.gradle dependencies

dependencies {
compile fileTree(dir: ‘libs’, include: ‘*.jar’)
// SUB-PROJECT DEPENDENCIES START
debugCompile project(path: “:CordovaLib”, configuration: “debug”)
releaseCompile project(path: “:CordovaLib”, configuration: “release”)
debugCompile project(path: “:com.phonegap.plugins.facebookconnect:oauth634839-FacebookLib”, configuration: “debug”)
releaseCompile project(path: “:com.phonegap.plugins.facebookconnect:oauth634839-FacebookLib”, configuration: “release”)
debugCompile project(path: “:com.google.playservices:oauth634839-google-play-services_lib”, configuration: “debug”)
releaseCompile project(path: “:com.google.playservices:oauth634839-google-play-services_lib”, configuration: “release”)
compile "com.google.android.gms:play-services-gcm:7.3.0"
compile “com.google.android.gms:play-services-analytics:7.3.0”
// SUB-PROJECT DEPENDENCIES END
}

I know that the error comes from here, but I don’t know how to let a single package com.google.android.gms, when I know I have not directly edit the file build.gradle

thanks.


#2

if someone has the same problem here is the solution, http://documentation.onesignal.com/docs/cordova-common-problems#clean-build the problem came from the module “one signal”