Android Studio Execution failed for task app mergeDebugResources if project is created on drive C

0 votes

I added Google Play services as a dependency in my current project. If I save the project on the C: drive, I get the following error while syncing up the project:

Error: Execution failed for task ':app:mergeDebugResources'. 
          > Error: Failed to run command: 
          C:\Program Files (x86)\Android\android-studio\sdk\build-tools\android-4.4.2\aapt.exe s -i C:\Users\ashokp\Desktop\Studio\AndroidV2SDK_AndroidStudioFormat\Google Play Services\SampleApplication\AndroidV2SDKSampleApp_GooglePlay
Services\app\build\exploded-aar\com.google.android.gms\play-services\4.3.23\res\drawable-hdpi\common_signin_btn_text_focus_light.9.png -o C:\Users\ashokp\Desktop\Studio\AndroidV2SDK_AndroidStudioFormat\Google Play Services\SampleApplication\AndroidV2SDKSampleApp_GooglePlayServices\app\build\res\all\debug\drawable-hdpi\common_signin_btn_text_focus_light.9.png 
Error Code: 42

This only happens if the project is saved on the C: drive. If I save it to some other drive, it works perfectly. Does anyone else face this issue? What causes this? How can I solve this?

enter image description here

Feb 18, 2022 in Others by Soham
• 9,700 points
5,810 views

1 answer to this question.

0 votes
To answer your question, this can only be caused by the path length restriction which I’m sure is 256 characters at the least for which you will need to relocate your project and the build will succeed.
answered Feb 18, 2022 by Aditya
• 7,680 points

Related Questions In Others

0 votes
0 answers

Execution failed app:processDebugResources Android Studio

I am working with other developers in ...READ MORE

May 17, 2022 in Others by Kichu
• 19,050 points
2,083 views
0 votes
1 answer

Project ID printed for every task on the API problem

Try this: def teste(id): listID = ...READ MORE

answered Feb 2, 2023 in Others by narikkadan
• 63,420 points
229 views
0 votes
2 answers

Is Peterson’s Algorithm a good solution for Critical Section problem? If yes, then why? If no, then why?

Peterson’s solution provides a good algorithmic description ...READ MORE

answered Jul 6, 2020 in Others by Gitika
• 65,910 points
1,906 views
0 votes
1 answer

Android Studio: Where is the Compiler Error Output Window?

While using Android Studio 3.1, please select ...READ MORE

answered Feb 11, 2022 in Others by Rahul
• 9,670 points
3,104 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,439 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I display an alert dialog on Android?

You could use an AlertDialog for this ...READ MORE

answered Feb 22, 2022 in Others by Aditya
• 7,680 points
1,155 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP