My builds have failed all week long

  • 1
  • Question
  • Updated 4 years ago
My app ID is 638197. I've been wrestling with doing this update all week long and I just really don't have a clue where I'm going wrong any more.

My Android build fails almost immediately with this error
Execution failed for task ':processReleaseManifest'.

And my iOS build fails with this error:
The following build commands failed:
CompileC build/YourHighPoint.build/Release-iphoneos/YourHighPoint.build/Objects-normal/armv7/CDVInAppBrowser.o YourHighPoint/Plugins/cordova-plugin-inappbrowser/CDVInAppBrowser.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

The iOS build has failed on successive plugins, many of which I've removed but we're getting down to bare bones here...

Below is my config.xml and below that the two Failure Errors.

<!-- config.xml reference: https://build.phonegap.com/docs/confi... -->

115

. . .

. . .

. . .

<!--
If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires.
-->

<!-- Customize your app and platform with the preference element. -->

<!-- all: default means both landscape and portrait are enabled -->

<!-- all: possible values handset, tablet, or universal -->

<!-- all: hides the status bar at the top of the screen -->
<!--
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarStyle" value="blackopaque" />
<preference name="ios-statusbarstyle" value="black-opaque" />
-->
<!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->

<!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->

<!-- ios: if icon is prerendered, iOS will not apply its gloss to the app's icon on the user's home screen -->

<!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->

<!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->

<!-- ios: if set to true, app will terminate when home button is pressed -->

<!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->

<!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->

<!-- android: MIN SDK version supported on the target device. MAX version is blank by default. 11 supports down to Android ver. 3.0 Honeycomb. -->

<!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->

<!--Specifies which build tool to compile the application. Valid build tools are 'gradle' and 'ant'. The default is 'ant'. -->

<!-- Plugins -->

<!-- Removed Plugins
<plugin name="cordova-plugin-camera" spec="1.0.0" />
<plugin name="cordova-plugin-contacts" spec="1.0.0" />
<plugin name="cordova-plugin-globalization" spec="1.0.0" />
<plugin name="cordova-plugin-file" spec="2.0.0" />
<plugin name="cordova-plugin-media-capture" spec="1.0.0" />
<plugin name="cordova-plugin-statusbar" spec="2.1.1" />
<plugin name="cordova-plugin-vibration" spec="1.0.0" />
<plugin name="de.appplant.cordova.plugin.hidden-statusbar-overlay" source="pgb" spec="1.2.0" />
-->

<!-- Android -->

<!-- iOS -->

——————————————

Android Error:

See http://g.co/androidstudio/manifest-me... for more information about the manifest merger.

:processReleaseManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute meta-data#com.google.android.gms.version@value value=(8115000) from AndroidManifest.xml:25:66-89
is also present at [com.google.android.gms:play-services-basement:8.4.0] AndroidManifest.xml:23:13-66 value=(@integer/google_play_services_version).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:9-92 to override.

* 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: 27.085 secs
undefined

————————————

iOS Error

** BUILD FAILED **

The following build commands failed:
CompileC build/YourHighPoint.build/Release-iphoneos/YourHighPoint.build/Objects-normal/armv7/CDVInAppBrowser.o YourHighPoint/Plugins/cordova-plugin-inappbrowser/CDVInAppBrowser.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Any thoughts?
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
  • sad, confused, frustrated

Posted 4 years ago

  • 1
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes

<?xml version="1.0" encoding="UTF-8" ?>

<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:gap="http://phonegap.com/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android"
id=“. . .“
versionCode="155"
version="1.7.5">
<config-file platform="ios" parent="CFBundleShortVersionString">
<string>115</string>
</config-file>

<name>. . .</name>

<description>. . .
</description>

<author href=“. . .“>
. . .
</author>

<preference name='phonegap-version' value='cli-6.0.0' />

<!--
If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires.
-->
<preference name="permissions" value="none" />

<!-- Customize your app and platform with the preference element. -->
<preference name="orientation" value="portrait" />
<!-- all: default means both landscape and portrait are enabled -->
<preference name="target-device" value="universal" />
<!-- all: possible values handset, tablet, or universal -->
<preference name="fullscreen" value="true" />
<!-- all: hides the status bar at the top of the screen -->
<!--
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarStyle" value="blackopaque" />
<preference name="ios-statusbarstyle" value="black-opaque" />
-->
<!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="webviewbounce" value="false" />
<!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="prerendered-icon" value="true" />
<!-- ios: if icon is prerendered, iOS will not apply its gloss to the app's icon on the user's home screen -->
<preference name="stay-in-webview" value="false" />
<!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
<preference name="detect-data-types" value="true" />
<!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
<preference name="exit-on-suspend" value="true" />
<!-- ios: if set to true, app will terminate when home button is pressed -->
<preference name="show-splash-screen-spinner" value="true" />
<!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
<preference name="auto-hide-splash-screen" value="true" />
<!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="android-minSdkVersion" value="11" />
<!-- android: MIN SDK version supported on the target device. MAX version is blank by default. 11 supports down to Android ver. 3.0 Honeycomb. -->
<preference name="android-installLocation" value="internalOnly" />
<!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->
<preference name="android-build-tool" value="gradle" />
<!--Specifies which build tool to compile the application. Valid build tools are 'gradle' and 'ant'. The default is 'ant'. -->

<!-- Plugins -->
<plugin name="cordova-plugin-battery-status" spec="1.0.0" />
<plugin name="cordova-plugin-console" spec="1.0.0" />
<plugin name="cordova-plugin-device" spec="1.0.0" />
<plugin name="cordova-plugin-device-motion" spec="1.0.0" />
<plugin name="cordova-plugin-device-orientation" spec="1.0.0" />
<plugin name="cordova-plugin-dialogs" spec="1.0.0" />
<plugin name="cordova-plugin-file-transfer" spec="1.0.0" />
<plugin name="cordova-plugin-geolocation" spec="1.0.0" />
<plugin name="cordova-plugin-inappbrowser" spec="1.0.0" />
<plugin name="cordova-plugin-media" spec="1.0.0" />
<plugin name="cordova-plugin-network-information" spec="1.0.0" />
<plugin name="cordova-plugin-splashscreen" spec="2.0.0" />
<plugin name="cordova-plugin-whitelist" spec="1.0.0" />
<plugin name="cordova-plugin-google-analytics" spec="0.8.1" />
<plugin name="com-admob-plugin" spec="5.3.0" />

<!-- Removed Plugins
<plugin name="cordova-plugin-camera" spec="1.0.0" />
<plugin name="cordova-plugin-contacts" spec="1.0.0" />
<plugin name="cordova-plugin-globalization" spec="1.0.0" />
<plugin name="cordova-plugin-file" spec="2.0.0" />
<plugin name="cordova-plugin-media-capture" spec="1.0.0" />
<plugin name="cordova-plugin-statusbar" spec="2.1.1" />
<plugin name="cordova-plugin-vibration" spec="1.0.0" />
<plugin name="de.appplant.cordova.plugin.hidden-statusbar-overlay" source="pgb" spec="1.2.0" />
-->

<icon src="icon.png" />
<splash src="splash.png" />

<!-- Android -->
<platform name="android">
<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
<splash src="res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" />
<splash src="res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi" />
<splash src="res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi" />
<splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi" />
</platform>

<!-- iOS -->
<platform name="ios">
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icon/ios/icon-60@2x.png" gap:platform="ios" width="120" height="120" />
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/icon-76@2x.png" gap:platform="ios" width="152" height="152" />
<splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
</platform>

<access origin="*" subdomains="true" browserOnly="true" />
<allow-navigation href="*" />

</widget>

——————————————

Android Error:

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

:processReleaseManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute meta-data#com.google.android.gms.version@value value=(8115000) from AndroidManifest.xml:25:66-89
is also present at [com.google.android.gms:play-services-basement:8.4.0] AndroidManifest.xml:23:13-66 value=(@integer/google_play_services_version).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:9-92 to override.

* 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: 27.085 secs
undefined

————————————

iOS Error

** BUILD FAILED **

The following build commands failed:
CompileC build/YourHighPoint.build/Release-iphoneos/YourHighPoint.build/Objects-normal/armv7/CDVInAppBrowser.o YourHighPoint/Plugins/cordova-plugin-inappbrowser/CDVInAppBrowser.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
These failures likely stem from the fact that you have all your plugins locked to old version using the spec attribute, but are using the newest version of Cordova. Try using the latest version of the plugins. You can also remove the attribute which will use the latest by default.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Andrew,

This reference article should help you get the latest version of "core" plugins.

Core Plugins Setup

Let me know how it works out.
Jesse
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
@ryan @JesseMonroy650

Thanks very much for pointing me at the plugin versions! I removed the spec attributes to just simplify and get the latest and greatest versions. This got my iOS build to work, so one down one to go.

The Android version is still failing though. I got the same error message:

:processReleaseManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute meta-data#com.google.android.gms.version@value value=(8115000) from AndroidManifest.xml:25:66-89
is also present at [com.google.android.gms:play-services-basement:8.4.0] AndroidManifest.xml:23:13-66 value=(@integer/google_play_services_version).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:9-92 to override.

Any thoughts?
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Andrew
it appears you have an issue with com.google.android.gms. If I am not mistaken, I believe this plugin needs gradle to be able to built. If I am wrong, perhaps someone else has an idea on this.

The directions are under:

Docs -> Configuring -> Preferences -> Android Only

See: android-build-tool

Your addition would look like this:
<preference name="android-build-tool" value="gradle" />

Jesse
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Errm....
- there is no plugin 'com.google.android.gms' included in the config
- gradle is already specified as build tool

====
The problem appears to be with the Google Services as referenced in androidManifest. Possible causes:
- androidManifest.xml was included in the assets
- build.gradle file from Visual Studio was included in the assets
- these two plugins don't play nicely together:
<plugin name="cordova-plugin-google-analytics" spec="0.8.1" />
<plugin name="com-admob-plugin" spec="5.3.0" />

Especially the former is known for being 'difficult to handle'

BTW:
The documentation for com-admob-plugin states that the plugin should be included as
<gap:plugin name="admob" version="5.4.2" source="npm"/>
which would now be equivalent to
<plugin name="admob" spec="5.4.2"/>
This would be the targeted plugin, then:
https://www.npmjs.com/package/admob

You might also want to try 'cordova-plugin-admob-plus'
https://www.npmjs.com/package/cordova...
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
Okay. There is no 'com.google.android.gms'. I don't know what the issue is. All yours. - Jesse
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
Jesse, Thanks for your help. I realize that with all of the comments I left in the code it's very difficult to see the code itself. I'll remove my comments the next time I have a problem.
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
@Petra V
Thanks for your info about both Google plugins. I didn't realize that 'cordova-plugin-google-analytics' is a problem in and of itself. I'll see if I can find a replacement. I also think I'll look into your suggestion about using 'cordova-plugin-admob-plus'
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
@Petra V
Just wanted to let you know that 'cordova-plugin-admob-plus' has been deprecated. I'm currently considering "cordova-plugin-admob-simple"