Android build error "Oh geez. Your build failed" with google analytics plugins

  • 1
  • Problem
  • Updated 4 years ago
  • In Progress
Hi there,

First of all, I would like to thanks all the people working / contributing to PGB and PGB plugins. This is so helpful, well documented and working smoothly.

Today, I integrated google analytics plugin (this one : https://github.com/danwilson/google-a...) and get it to work perfectly with iOs. (I didn't check android build yet).

Now that it is working, I unlocked my android key and built it but it said I needed to use the "gradle android build" which I did and the error message was gone but now I keep getting this error :
"Oh geez. Your build failed. Sorry, but a problem occurred on the build server"

If I remove the google analytics plugin, it builds fine.

I've tried with 3 google analytics plugins but everytime I have the same error "Oh geez. Your build failed. Sorry, but a problem occurred on the build server".

Could you help me fix this ?

Thanks a lot,
Romain.
Photo of Romain[BE]

Romain[BE]

  • 13 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Devin Garner

Devin Garner

  • 5 Posts
  • 1 Reply Like
Try this in your config.xml :
<gap:plugin name="cordova-plugin-google-analytics" version="0.7.1" source="npm" />

I've gotten a similar error when using the latest version of the plugin, but the 0.7.1 version seems to work fine for me.
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Dear Romain

Can you try Devin's resolution above? Do let us know the outcome.

Thanks.
Photo of Romain[BE]

Romain[BE]

  • 13 Posts
  • 0 Reply Likes
Hi, thanks for the fast response,

When I set a version code as Devin suggested I got this error message :

Error - Two of the plugins in your app are incompatible as they both add a file with the same name. View logs to find which plugins are causing this issue. - You can fix this here

This is all the plugins I use :

<gap:plugin name="cordova-plugin-camera" source="npm" />
<gap:plugin name="cordova-plugin-device" source="npm" />

<gap:plugin name="cordova-plugin-dialogs" source="npm" />
<gap:plugin name="cordova-plugin-file-transfer" source="npm"/>
<gap:plugin name="cordova-plugin-geolocation" source="npm" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm"/>
<gap:plugin name="cordova-plugin-network-information" source="npm" />
<gap:plugin name="cordova-plugin-splashscreen" source="npm" />
<gap:plugin name="pushwoosh-pgb-plugin" source="npm" />
<gap:plugin name="cordova-plugin-legacy-whitelist" source="npm" />

<gap:plugin name="cordova-plugin-google-analytics" version="0.7.1" source="npm" />
<gap:plugin name="cc.fovea.cordova.purchase" source="npm" version="4.0.0" >
<param name="BILLING_KEY" value="XYZ" />
</gap:plugin>
Photo of Romain[BE]

Romain[BE]

  • 13 Posts
  • 0 Reply Likes
This is the android log (doesn't show anything, no conflicts)

Build Date: 2015-10-19 16:51:28 +0000
----------------------------------------------
debug: Creating Cordova project for the Android platform:
Path: ../../../../../../project
Package: ***.***.***
Name: ***
Activity: ***
Android target: android-22
Copying template files...
Android project created with cordova-android@4.0.2
Photo of Romain[BE]

Romain[BE]

  • 13 Posts
  • 0 Reply Likes
@amir

Still having this issue, only on android, log is not showing anything and error message remain

Error - Two of the plugins in your app are incompatible as they both add a file with the same name. View logs to find which plugins are causing this issue. - You can fix this here
Photo of Joao Silva

Joao Silva

  • 53 Posts
  • 0 Reply Likes
Same here today when using "phonegap-googlemaps-plugin"

<gap:plugin name="cordova-plugin-armsoft-googlemaps" source="npm">
<param name="API_KEY_FOR_ANDROID" value="My key" />
<param name="API_KEY_FOR_IOS" value="MY key" />
</gap:plugin>
Photo of Devin Garner

Devin Garner

  • 5 Posts
  • 1 Reply Like
Fyi, the issue with the google analytics plugin has been corrected and the old versions have been removed from npm.

Now, the correct way to reference the plugin is


<gap:plugin name="cordova-plugin-google-analytics" source="npm" />
Photo of Hernan Hambra

Hernan Hambra

  • 2 Posts
  • 0 Reply Likes
How to add ID number in hybrid app html5 with css?
Thanks!