Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':app:mergeDebugResources'. #1250

Closed
3 tasks done
GoldHatGamer opened this issue Jul 1, 2021 · 6 comments
Closed
3 tasks done

Execution failed for task ':app:mergeDebugResources'. #1250

GoldHatGamer opened this issue Jul 1, 2021 · 6 comments

Comments

@GoldHatGamer
Copy link

Bug Report

Problem

What is expected to happen?

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-linux Daemon apache/cordova#6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 21m 15s
20 actionable tasks: 20 executed
/root/hello/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-linux Daemon apache/cordova#6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

What does actually happen?

Information

Command or Code

Environment, Platform, Device

I using ubuntu in termux
My device redmi Y2

Version information

Cordova: Cordova CLI
Operating System: Ubuntu arch x86

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@timbru31 timbru31 transferred this issue from apache/cordova Jul 1, 2021
@ghost
Copy link

ghost commented Jul 27, 2021

Same/similar issue here. In my case, I've found the problem is all edit-config and config-file tags can only be run once when building. After building it once and the edit configs and config files are applied (in this case to the AndroidManifest.xml), commenting/removing them from the config.xml seems to fix the compiling issue.

@mleech
Copy link

mleech commented Feb 17, 2022

I had the same issue and finally found a solution in a comment to a blog post here : https://www.damirscorner.com/blog/posts/20171117-CustomizingAndroidManifestInCordova.html#comment-4550864745

Adding the attribute xmlns:android="http://schemas.android.com/apk/res/android" to the <widget> element in config.xml fixed it.

@igorsantos07
Copy link

igorsantos07 commented Feb 21, 2022

After several, several hours mix-and-matching all sorts of Java and Android tools and versions, I found on an unrelated issue how to run the Android project from the Studio. THERE the build output had more details and I could see that Gradle was simply unable to write to its cache in my home dir (no clue why). Solved that and it runs......... From Studio. CLI causes another issue related to AndroidDebugKey length, but that's another topic :)

@breautek
Copy link
Contributor

This should not happen under normal circumstances, please file an issue if it does.

This is an error coming from Gradle, so the bug report should be made against gradle.

To get more information for a gradle bug report, from platforms/android directory, you can run ./gradlew app:buildDebug --info --stacktrace.

For this reason I'm closing this issue. However if there is a specific cordova configuration that doesn't work, a new issue can be reported with a minimal reproduction and we can take a look.

@raldincasidar-studio
Copy link

I had the same issue and finally found a solution in a comment to a blog post here : https://www.damirscorner.com/blog/posts/20171117-CustomizingAndroidManifestInCordova.html#comment-4550864745

Adding the attribute xmlns:android="http://schemas.android.com/apk/res/android" to the <widget> element in config.xml fixed it.

this works guys!

@vinaythapa1
Copy link

I had the same issue and finally found a solution in a comment to a blog post here : https://www.damirscorner.com/blog/posts/20171117-CustomizingAndroidManifestInCordova.html#comment-4550864745

Adding the attribute xmlns:android="http://schemas.android.com/apk/res/android" to the element in config.xml fixed it.

Thanks it is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants