Unable to run/build android (:CordovaLib:processDebugResources FAILED)
###Execution failed for task ‘:CordovaLib:processDebugResources’.
Hello I’m ionic newbie apologize to my english but I’m about to get mad before a couple of days trying to understand why the build fails.
Every project I tried, also the starter projects like:
ionic start myApp tabs
ionic start myApp menu
ionic start myApp tutorial
works fine I could serve in the browser by:
myApp> ionic serve
but when I try to build/run the project for android platform by:
ionic cordova build android
ionic cordova run android <–target> (Also with the device ID from adb devices)
The build fails and returns the following error:
Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externa
lIpRequired --nobrowser
[00:49:11] build dev started …
[00:49:11] clean started …
[00:49:11] clean finished in 11 ms
[00:49:11] copy started …
[00:49:11] transpile started …
[00:49:14] transpile finished in 3.17 s
[00:49:14] preprocess started …
[00:49:14] deeplinks started …
[00:49:14] deeplinks finished in 27 ms
[00:49:14] preprocess finished in 29 ms
[00:49:14] webpack started …
[00:49:15] copy finished in 3.43 s
[00:49:24] webpack finished in 9.28 s
[00:49:24] sass started …
[00:49:25] sass finished in 1.10 s
[00:49:25] postprocess started …
[00:49:25] postprocess finished in 12 ms
[00:49:25] lint started …
[00:49:25] build dev finished in 13.70 scordova run android --target XXXXXXXXXXX
ANDROID_HOME=C:\Users\Me\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_73
Subproject Path: CordovaLib
[00:49:29] lint finished in 4.00 s
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Ac
tion) instead.
at build_ajuzvi2l53suo4b7l6zvmqd68.run(C:\Users\Marco\Documents\MilizianCompany\testTab\platforms\android\build.gradle
:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.f
ile(Object).skipWhenEmpty() instead.
:preBuild
UP-TO-DATE
:preDebugBuild
UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugNdk
UP-TO-DATE
:CordovaLib:compileLint
UP-TO-DATE
:CordovaLib:copyDebugLint
UP-TO-DATE
:CordovaLib:mergeDebugShaders
UP-TO-DATE
:CordovaLib:compileDebugShaders
UP-TO-DATE
:CordovaLib:generateDebugAssets
UP-TO-DATE
:CordovaLib:mergeDebugAssets
UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
UP-TO-DATE
:CordovaLib:packageDebugRenderscript
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
UP-TO-DATE:CordovaLib:processDebugResources
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:CordovaLib:processDebugResources’.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.
FAILED
BUILD FAILED
Total time: 3.129 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:CordovaLib:processDebugResources’.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.
I tried all the resolved issues on github, all the solved questions on stackOverFlow.
I dont know why the starter projects returns gradle warnings with obsolete/deprecated tasks and I can’t find out the error.
Working on windows10 with:
- ionic 3.3.0 (also 3.2.0)
- cordova 7.0.1
- npm 3.10.10
- node v6.10.2
Thanks in advance.