when I run my project with assembleDebug , I get this error
:app:mergeDebugResources
C:\Users\Deepan\Downloads\googleads-mobile-android-examples-
master\googleads-mobile-android-examples-master\java\admob\NativeAdvancedExample\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-sw600dp-v13\values-sw600dp-v13.xml: error: file not found.
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
I got the same problem and moving entire project to another location where the path is shorter solved it. You also have a quite long path.
File values-sw600dp-v13.xml
is missing from values-sw600dp-v13 folder.
past the file in values-sw600dp-v13 and it should work.
Related
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeProdDebugResources'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).
i used in jenkins next command: assembleDebug -g C:\gradle_home
How i can solve this problem?
because the input project file path is too long, aapt can't work corretly with it.
changing the project workspace dir of jenkins can fix this error.
Please refer the error message given below.Every time I am starting an empty activity, I am getting the following error. This is my 6th time trying every possible solution out there.
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
C:\Users\cheik\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\396858f1c27f92ab2ca967b96e3a0da9\res\values-v28\values-v28.xml
Error:(9, 5) error: resource android:attr/dialogCornerRadius not found.
C:\Users\cheik\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\396858f1c27f92ab2ca967b96e3a0da9\res\values\values.xml
Error:(1304, 5) error: resource android:attr/fontVariationSettings not found.
Error:(1304, 5) error: resource android:attr/ttcIndex not found.
C:\Users\cheik\OneDrive\Desktop\MYAPP\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml
Error:(11) error: resource android:attr/dialogCornerRadius not found.
Error:(7) resource android:attr/dialogCornerRadius not found.
Error:(11) resource android:attr/dialogCornerRadius not found.
C:\Users\cheik\OneDrive\Desktop\MYAPP\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(514) resource android:attr/fontVariationSettings not found.
Error:(514) resource android:attr/ttcIndex not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: 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:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED in 1s
Information:13 errors
Information:0 warnings
Information:See complete output in console
Experienced this issue a while ago with Android studio 3.5, have you tried to set:
compileSdkVersion 28 or compileSdkVersion 29 in my case, got to: app > build.gradle, this solved it for me.
you can also try to file > invalidate caches / restart
i noticed you're still on AppCompat 28 library, i suggest you migrate to AndroidX, Refactor > migrate to AndroidX
I am new to Android Studio I just opened a template as normal as anybody can do when first open android studio, I didn't edit anything I just tried to build the apk and got that error, can someone help?
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.1-6197926-linux Daemon #8: Daemon startup failed
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.1-6197926-linux Daemon #6: Daemon startup failed
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.1-6197926-linux Daemon #5: Daemon startup failed
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.1-6197926-linux Daemon #7: Daemon startup failed
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.1-6197926-linux Daemon #12: Daemon startup failed
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.1-6197926-linux Daemon #9: Daemon startup failed
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.1-6197926-linux Daemon #11: Daemon startup failed
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.1-6197926-linux Daemon #10: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.```
Try following options:
clean & rebuild your project
Restart the android studio
Try Invalidate caches and restart
Delete C:\Users\{username}\.gradle\caches folder and restart Android
studio
Check and Update your android gradle plugin version
Also check your gradle.properties contain below line or not.
org.gradle.jvmargs=-Xmx4608m
Spent weeks on and off with an AAPT2 error: no such file or directory
despite the file concerned being present and not malformed/corrupt (the underlying problem in all the solutions I found online)
I finally discovered that AAPT2 uses the mmap() C library call to map resources into memory for the merge process (AAPT did not.)
My projects were on a network share (SSHFS), which caused an mmap error the AAPT2 code was not expecting, resulting in the inaccurate error message.
The only solutions I could find were:
Don't use a network share (who needs networks right?)
Rewrite AAPT2 to not use mmap.
Above error along with these errors and cannot resolve R symbol error.
Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request.
Check logs for details.
Error:Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request.
Check logs for details.
I tried all solutions given like rebuild,invalidate caches and restart, changed dependencies as well and clean project did not used any images. I installed android studio 3.0.1 in ubuntu 14.04 OS type 32-bit
Is this a installed android stdio version mistake please help me out.
Iam completely new to building app in react-native and when i was building my app i get this error, i tried searching in google but couldn't find any results which is helpful so please kindly help me solve this.
This is the error i get when running:
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:recordFilesBeforeBundleCommandDebug
:app:bundleDebugJsAndAssets SKIPPED
:app:generateBundledResourcesHashDebug
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
:app:processDeb
ugManifest U
P-TO-DATE
:app:processDebugResources
Unknown source file : ERROR: Unable to open class file ...
roject\android\app\build\generated\source\r\debug\com\newapp\R.java: Permission denied
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\..\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
For me it helped to change the version of buildTools to:
buildToolsVersion "21.0.1"
You will find this setting inside the file app/build.gradle.