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 in Others by Soham
• 9,670 points
2,864 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 by Aditya
• 7,660 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 in Others by Kichu
• 19,040 points
1,177 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,890 points
1,232 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 in Others by Rahul
• 9,680 points
649 views
0 votes
1 answer

"Default Activity Not Found" on Android Studio upgrade

If you see that ERROR occurrence after ...READ MORE

answered Feb 11 in Others by Soham
• 9,670 points
361 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
2,072 views
+2 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 in Others by Aditya
• 7,660 points
523 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