FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #4: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #3: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #5: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #6: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #7: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #8: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #9: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-windows Daemon #10: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
Daemon startup failed Please check if you installed the Windows
Universal C Runtime.
Have you updated your Runtime ?
Download: https://support.microsoft.com/en-ca/help/2999226/update-for-universal-c-runtime-in-windows
Related
I am trying to run a clean build of a simple Android Studio project using gradle in TeamCity.
It runs a few tasks, but then stops and returns this error:
Execution failed for task ':app:mergeDebugResources'.
com.android.ide.common.workers.WorkerExecutorException: 8 exceptions
were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
aapt2-3.4.2-5326820-windows Daemon #7: Daemon startup failed
This should not happen under normal circumstances, please file an issue
if it does.
It doesn't get past this error, and can't successfully do a clean build of it.
I can't comment yet so I will just leave an answer in hopes it will help you in some ways.
What is your full project directory? It maybe caused due to long path names.
Try restarting your ADB, Project, up to the point where even a PC restart may work
Do you have enough privileges to and on the directory?
Try adding this to your build.gradle
android {
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
}
Lastly try to rebuild your project by going to Build > Rebuild project. Or even do a clean by Build > clean project.
Let me know if anything works. Happy Coding :)
I've installed TeamCity 2019.1 in my PC to test CI/CD on Android projects. But I'm facing the following problem when build the project only in TeamCity:
[10:23:22] [Step 1/3] > Task :app:mergeDebugResources FAILED
[10:23:24] [Step 1/3] Execution failed for task ':app:mergeDebugResources'. com.android.ide.common.workers.WorkerExecutorException: 8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #0: Daemon startup failed
This question is similar to my problem but that case the error occurs in Android Studio: [question]: Execution failed for task ':app:mergeDebugResources' Error on creating first project on windows android studio
In Android Studio that project works fine. I tried to checkout this project from Github and build it running gradlew clean build and it also works fine for me.
Following the build log:
[10:23:24] [Step 1/3] Execution failed for task ':app:mergeDebugResources'. com.android.ide.common.workers.WorkerExecutorException: 8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #7: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
[10:23:23] [Step 1/3]
[10:23:23] [Step 1/3] 10 actionable tasks: 9 executed, 1 up-to-date
[10:23:24] [Step 1/3] Process exited with code 1
[10:23:24] [Step 1/3] Gradle failure report
[10:23:24] [Step 1/3] Process exited with code 1 (Step: gradle-build (Gradle))
[10:23:24] [Step 1/3] Step gradle-build (Gradle) failed
Any guess about how to solve this problem?
Here is the solution:
Ctrl+Alt+Suppr to open task manager
Kill all "Java(TM) Platform SE binary" process
react-native run-android
You need to give path of SDK installed on the build machine.
Check the answer from this thread.
https://stackoverflow.com/a/56421370/4181904
Executing tasks: [clean, :app:assembleDebug]
Configure project :
This version of Gradle requires version 2.0.2 of the build scan plugin or later.
Please see https://gradle.com/scans/help/gradle-incompatible-plugin-version for more information.
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:checkDebugManifest
Task :app:generateDebugBuildConfig
Task :app:prepareLintJar UP-TO-DATE
Task :app:generateDebugSources
Task :app:javaPreCompileDebug
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #7: 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 1s
10 actionable tasks: 8 executed, 2 up-to-date
Issue was that I followed tutorial created for non-mobile devices.
Which meant Unitys build options requires special option for mobile builds.
newBuildPlayerOptions.options = BuildOptions.AcceptExternalModificationsToPlayer;
Executing tasks: [clean, :app:assembleDebug]
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:checkDebugManifest
Task :app:generateDebugBuildConfig
Task :app:prepareLintJar UP-TO-DATE
Task :app:generateDebugSources
Task :app:javaPreCompileDebug
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #7: 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 3s
10 actionable tasks: 8 executed, 2 up-to-date
I could successfully build APKs in old 2.1 version, but I have the same THREE errors in newly installed android studio 3.4.1.
app:compileDebugAidl NO-SOURCE
:app:compileDebugRenderscript NO-SOURCE
app:mergeDebugResources
I tried cleaning project followed by rebuilding then invalidating cache and restarting... Nothing worked. I even uninstalled and reinstalled it, but in vain.
Some how I came to see an error by by clicking a link in error description. The link opened a class file.
import com.google.generate
Here generate is shown in RED.... I think this this may be the reason of errors in building. But I haven't found a solution yet. I should be obliged if someone can help.
Go to Build tool bar then choose clean project, try again to build but make sure you’re on the Internet
I got this error:
Error:Execution failed for task ':app:generateDebugBuildConfig'. > java.io.IOException: Could not delete path 'C:\Users\Guest Account\Documents\COLLEGE\FYP\7. Iteration 4\fridge iteration 4\app\build\generated\source\buildConfig\debug\com'.
and saw 'could not delete path' so I decided to follow the path and delete the path. When I reran the app I got seven new errors:
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:failed linking file resources.
Error:attribute 'com.virtual.fridge:layout_behavior' not found.
Error:error: attribute 'com.virtual.fridge:layout_behavior' not found.
In my even log I have two new messages:
* daemon not running; starting now at tcp:5037
21:10 * daemon started successfully
I am going to presume this is down to deleting that file.. is there anything I can do? Really new to android studio so I appreciate any help. Please tell me what other information I shoudl provide
I cleaned the project and built it and it worked