cordova build android --release gives this following error. I tried everything including running ionic cordova resources as well as deleting the resources folder
Android Studio project detected
ANDROID_HOME=/root/…/mnt/c/Users/armaa/AppData/Local/Android/Sdk
JAVA_HOME=/usr
studio
:wrapper
BUILD SUCCESSFUL
Total time: 5.273 secs
This build could be faster, please consider using the Gradle Daemon: Chapter 6. The Gradle Daemon
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_b7addsy8zf7x7zfbxfp3zv08p.run(/mnt/c/Users/armaa/Desktop/coding/ionic/test/platforms/android/app/build.gradle:148)
Configuration ‘compile’ in project ‘:app’ is deprecated. Use ‘implementation’ instead.
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseRenderscript
:CordovaLib:checkReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processReleaseManifest
:CordovaLib:javaPreCompileRelease
:CordovaLib:processReleaseJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preReleaseBuild
:app:compileReleaseAidl
:CordovaLib:packageReleaseRenderscript NO-SOURCE
:app:compileReleaseRenderscript
:app:checkReleaseManifest
:app:generateReleaseBuildConfig
:app:prepareLintJar
:app:generateReleaseResValues
:app:generateReleaseResources
error: bad resource path (/mnt/c/Users/armaa/Desktop/coding/ionic/test/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml).
:app:mergeReleaseResources
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeReleaseResources FAILED
18 actionable tasks: 18 executed
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:mergeReleaseResources’.
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. -
Get more help at https://help.gradle.org
BUILD FAILED in 16s
/mnt/c/Users/armaa/Desktop/coding/ionic/test/platforms/android/gradlew: Command failed with exit code 1 Error output:
error: bad resource path (/mnt/c/Users/armaa/Desktop/coding/ionic/test/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml).
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:mergeReleaseResources’.
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. -
Get more help at https://help.gradle.org
BUILD FAILED in 16s
[ERROR] An error occurred while running subprocess cordova.
cordova build android --release exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.