3
votes

please help. why cordova cli build always failed after add crosswalk webview plugin? no matter what version of android platforms that i used, i was try for cordova [email protected], 6.2.3, 6.3.0, 7.0.0.. but successfull without this plugin. it is weird, because i was succeed on April, but now getting error and failed to build.. i was uninstall and install node.js, git, cordova.. same project that was succeed with crosswalk, i build again and getting error result..failed too..

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7ReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* 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: 2 mins 47.283 secs
(node:5976) UnhandledPromiseRejectionWarning: Error: cmd: Command failed 
with ex
it code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

D:\5.GAME\Cordova\4keempat\Gardam\platforms\android\build\intermediates\manifest s\full\armv7\release\AndroidManifest.xml:24: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android' D:\5.GAME\Cordova\4keempat\Gardam\platforms\android\build\intermediates\manifest s\full\armv7\release\AndroidManifest.xml:24: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7ReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- 
debug
option to get more log output.
at ChildProcess.whenDone (D:\5.GAME\Cordova\4keempat\Gardam\platforms\androi
d\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
(node:5976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 
This
error originated either by throwing inside of an async function without a 
catch
block, or by rejecting a promise which was not handled with .catch(). 
(rejection
 id: 1)
(node:5976) [DEP0018] DeprecationWarning: Unhandled promise rejections are 
deprecated. In the future, promise rejections that are not handled will 
terminate the Node.js process with a non-zero exit code.

what is the problems?

3
Running into same issue. But I needed to reinstall my PC, saved everything (whole codebase) And still running into this issue. Downgrade of cordova doesn't helpgraphefruit

3 Answers

12
votes

We had the same problem and were able to solve it by adding the following code-block the the platforms/android/build.gradle:

configurations.all {
  resolutionStrategy {
    force 'com.android.support:support-v4:24.0.0'
  }
}

It's possible to do it with a hook, like described here: https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/issues/205#issuecomment-371797767

4
votes

The error occures from Cordova plugins using different versions of Android Support Libraries. cordova-android-support-gradle-release can help you force them to use the same version.

1
votes

add cordova-android-support-gradle-release

and then, add in config.xml

<plugin name="cordova-android-support-gradle-release" spec="^1.4.3">
    <variable name="ANDROID_SUPPORT_VERSION" value="26.+" />
</plugin>`