Android build failed
Hi,
When trying to execute ionic build android on Arch Linux:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/me/bin/android-sdk-linux/build-tools/24.0.1/aapt'' 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.
BUILD FAILED
Total time: 5.159 secs
Error: Error code 1 for command: /home/me/git/my-project/ionicApp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/me/git/my-project/ionicApp/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
Already tried:
- removing and re-adding android platform
- removing ~/.gradle folder
- updating android sdk
- re-installing whole android sdk
I'm at my wits end here... Any help would be highly appreciated!
I have the same issue after I install the ionic push plugin and upgrade the ionic-cli to 2.0, I tried:
- downgrade the ionic-cli to 1.3.1 and uninstall the ionic push plugin
- rm/add android platform
- reset/restore ionic project
- updated/uninstall&install Android SDK, build-tool
- updated/uninstall&install Gradle tool
After I have these attempts, the problem stays. My projects in the Android Studio works like usual but only the one for the Ionic project fails, here is my error message: Error: **/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'Library/Android/sdk/build-tools/24.0.1/aapt'' 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.
Looking for solutions too.
Facing issue
ANDROID_HOME={DIR}/android-sdk-linux JAVA_HOME=/usr/lib/jvm/java-8-oracle Subproject Path: CordovaLib [12:13:52] lint finished in 4.31 s 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_9v4y3440rc9w7vvo7xz6swow6.run(/var/www/html/kapil/ionic3/ionic3-angular4-sample-app/platforms/android/build.gradle:141)
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.file(Object).skipWhenEmpty() instead.
:preBuild
UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest
:preReleaseBuild UP-TO-DATE :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:generateDebugResValues UP-TO-DATE :CordovaLib:generateDebugResources UP-TO-DATE :CordovaLib:packageDebugResources UP-TO-DATE :CordovaLib:processDebugManifest UP-TO-DATE :CordovaLib:generateDebugBuildConfig UP-TO-DATE :CordovaLib:processDebugResources FAILED
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.
BUILD FAILED
Total time: 2.536 secs Error: /var/www/html/kapil/ionic3/ionic3-angular4-sample-app/platforms/android/gradlew: 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.
[ERROR] An error occurred while running cordova build android (exit code 1).
Duplicate of https://github.com/ionic-team/ionic-cli/issues/2961