Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':processArmv7ReleaseResources' #172

Closed
matthewct opened this issue Jan 22, 2017 · 5 comments
Closed

Execution failed for task ':processArmv7ReleaseResources' #172

matthewct opened this issue Jan 22, 2017 · 5 comments

Comments

@matthewct
Copy link

matthewct commented Jan 22, 2017

I have built an Android App using Intel XDK version 3759 which uses the following plugins:

  • cordova-plugin-statusbar 2.2.0
  • cordova-plugin-device 1.1.3
  • cordova-plugin-splashscreen 3.2.2
  • cordova-plugin-compat 1.0.0
  • cordova-plugin-geolocation 2.4.0
  • cordova-plugin-inappbrowser 1.5.0
  • cordova-plugin-network-information 1.3.0
  • cordova-plugin-dialogs 1.3.0
  • cordova-plugin-request-location-accuracy 2.2.0
  • com.phonegap.plugins.nativesettingsopener 1.2
  • cordova.plugins.diagnostic 3.3.3

For some reason, my working app suddenly failed to build, and I am sure I had not made changes to it. The error in the log file is as follows:

* What went wrong:
Execution failed for task ':processArmv7ReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '.../android-sdk/build-tools/25.0.0/aapt'' finished with non-zero exit value 1

I have tried updating the plugins above to their latest versions, including "cordova.plugins.diagnostic" to 3.3.3 but the build still fails. I can only get the build to work if I roll back "cordova.plugins.diagnostic" to 3.1.1 , but then I lose functionality which I had previously (it fails with anything newer than 3.1.1).

The attached log file had the same failure message before I updated the plugins to the latest.

Any comments or help on this problem would be much appreciated, I have uploaded the log file below:

locaterate.build.201701220604.txt

Thank you.

@dpa99c
Copy link
Owner

dpa99c commented Jan 22, 2017

Looking at your build log, the error causing the build to fail is:

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

This is the same as #168: the cause is that the Android SDK used for compilation is mismatched with the version of the Android Support Library. And in Cordova projects, the Android compile SDK is implicitly related to the version of the Cordova Android platform in your project:

`[email protected]` => Android SDK v23
`[email protected]` => Android SDK v24

Intel XDK must be defaulting to [email protected] hence compiling with SDK v23, but this plugin is pulling in the most recent version syndicated by Google - which is currently v24.

So, v23 compile SDK + v24 support library = your error

The reason v3.1.1 of this plugin works is that it pins the version of the support library to v23 which works with Android SDK v23 which is used by cordova-android@5. The problem with pinning the version of the support library is that if other plugins specify a different version, the build fails (see #105). Hence, since v3.1.2 of this plugin, the version of the support library is unpinned to use the most recent version syndicated by Google - which is currently v24.

If you were building locally, the solution would be simple: upgrade your Cordova Android platform to the latest version: [email protected] which targets Android SDK v24:

cordova platform rm android && cordova platform add android@latest

I've no idea if you can specify the platform version using Intel XDK; I know that you can do it for Phonegap Build by specifying the phonegap-version preference - see here.

So you either need to figure out how to specify the Cordova Android platform version in Intel XDK and set it to [email protected], or if that's not possible, fork the plugin and pin the support library version to v23 in the plugin.xml (as v3.1.1 does):

<framework src="com.android.support:support-v4:23.+" />
<framework src="com.android.support:appcompat-v7:23.+" />

@matthewct
Copy link
Author

Thank you for your prompt reply.

I have had a look at Intel XDK which currently states "Using platform cordova-android 5.1.1" in the build log. I also checked on Cordova, and it seems that API-Level 23 is the latest as it states in the following link "Cordova's latest Android package supports up to Android API-Level 23":

https://cordova.apache.org/docs/en/latest/guide/platforms/android/

I have only started using Intel XDK and these tools recently so I will need to investigate how to proceed with this issue.

@dpa99c
Copy link
Owner

dpa99c commented Jan 23, 2017

I also checked on Cordova, and it seems that API-Level 23 is the latest as it states in the following link "Cordova's latest Android package supports up to Android API-Level 23"

Unfortunately Cordova documentation is always somewhat out-of-date, including that page. The best place to looks for recent updates is their release notes:

https://github.com/apache/cordova-android/blob/master/RELEASENOTES.md

Full Support for Android Nougat (API 24)

@matthewct
Copy link
Author

I asked a question on the Intel XDK forum and received the reply copied below:

https://software.intel.com/en-us/forums/intel-xdk/topic/709382

Our build system does not include a version of Cordova that support [email protected], so that means you cannot use that plugin with our build system. You need to either build the app using PhoneGap Build or using Cordova CLI, locally.

I am now going to change to Adobe PhoneGap Build.

Thank you for your help and fast response, keep up the great work.

@matthewct
Copy link
Author

I have now converted my application across to "Adobe PhoneGap Build" and this allowed me to use phonegap-version cli-6.4.0 as shown here:

https://build.phonegap.com/current-support

After being able to upgrade to cli-6.4.0 the problem was resolved.

@matthewct matthewct reopened this Jan 27, 2017
@dpa99c dpa99c closed this as completed Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants