Android build problem in windows 7

:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources FAILED


Total time: 3.398 secs

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:CordovaLib:processDebugResources’. org.gradle.process.internal.E
xecException: Process ‘command ‘C:\Users\AN023SH\AppData\Local\Android\sdk\build
-tools\23.0.2\aapt.exe’’ finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.
    Error: Error code 1 for command: cmd with args: /s,/c,“C:\Windows\System32\myApp
    \platforms\android\gradlew cdvBuildDebug -b C:\Windows\System32\myApp\platforms
    android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true -Pandroid.useDe

First before you make “ionic platform add android” you have to look.

Android platform version that you have installed (Ex. api 23 MashMallow, api 22…).
Now go to your ionic project and look config.xml

preference value=“16” name=“android-minSdkVersion”/> and change to de api you install.
preference value=“23” name=“android-minSdkVersion”/>
put the minSdkVersion at the same version of the api you have intall.

Add the platform and build the project.
EX: ionic platform add android
ionic build android

If you install only 1 android platform version de minsdkVerion and the targetsdkVersion has to be the same as the api you install.