Software Archive
Read-only legacy content
17061 Discussions

Build error plugin conflict

Darrell_L_
Beginner
396 Views

I have run into an error doing an android build.  My ionic, angularjs app already has the admob plugin in the project.  I am trying to add push notification with the onesignal plugin.  I have now ran into a plugin conflict in the build process, and I am not sure how to resolve this.  

 

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':processArmv7ReleaseResources'.

> Error: more than one library with package name 'com.google.android.gms'

  You can temporarily disable this error with android.enforceUniquePackageName=false

  However, this is temporary and will be enforced in 1.0

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

 

BUILD FAILED

 

Total time: 49.336 secs

ERROR building one of the platforms: Error: .../cordova_project/platforms/android/gradlew: Command failed with exit code 1

You may not have the required environment or OS to build this project

Error: .../cordova_project/platforms/android/gradlew: Command failed with exit code 1

    at ChildProcess.whenDone (.../cordova_project/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:139:23)

    at emitTwo (events.js:87:13)

    at ChildProcess.emit (events.js:172:7)

    at maybeClose (internal/child_process.js:821:16)

    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

0 Kudos
6 Replies
Jerroyd_M_Intel
Employee
396 Views

Update your plugins. Plugins are conflicting with a gradle id, which should be resolved by the plugin authors. Plugins with active maintainers should have solved this already, otherwise you'll have to contact the plugin owner to report the issue.

0 Kudos
Darrell_L_
Beginner
396 Views

I tried removing my plugins, the admob pro, and adding it again, and I got the same error.  I decided to remove the extra google plugin that I installed, assuming that I already had one in place, so I wanted to find out what would happen.  I tried to simulate the app to test  if it would work( I know the third party plugins wouldn't work)  The simulate gave an error. Title:  Cordova Prepare Error  Error Message: {}

I am not sure what to think.  I tried to do a build, and the build succeeded.  Not sure if it works, but I need to have the simulate functionality working.  Thoughts? Should I try something else?

 

0 Kudos
Jerroyd_M_Intel
Employee
396 Views

You need to contact the plugin developer and get them to change their id from 'com.google.android.gms' to something else. Unless both plugins use the same play services sdk libs, in which case, I'm not the person who could help you with that.

0 Kudos
Darrell_L_
Beginner
396 Views

Keep in mind, the build will succeed, but the simulation fails.  I added the onesignal plugin by following their instructions for xdk

https://documentation.onesignal.com/docs/intel-xdk-installation

i added the onesignal plugin, and as they reccommeded I added the google-play-services plugin.  I have removed the  google-play-services plugin as from what I can tell from the first error I already had a plugin in place, and now the build will succeed, but the simulation now gives the error message that I have reported above.    I am not sure, but I feel onesignal will point the finger back at the simulation failing and say this is xdk error, as the build is succeeding.  I could be missing something could you tell me how to phraise the question to one signal  

 

0 Kudos
Jerroyd_M_Intel
Employee
396 Views

Hi Darrell L.,

I see I misunderstood that the problem has shifted to the simulate tab. I'll ask my colleague who works in this area to take a look.

--Jerroyd

0 Kudos
Byoungro_S_Intel
Employee
396 Views

Hi Darrell L.,

It is hard to think of the cause the failure with the limited info.

Did you try to restart the XDK and simulate app again?

If it does not help, would you attach your project so that we can investigate the issue?

0 Kudos
Reply