Android Studio: “Execution failed for task ':app:mergeDebugResources'” if project is created on drive C:
This is caused by the path length restriction. I think it's 256 characters maximum.
Relocate your project and the build will succeed.
I had the same problem. Try to go to Build - Rebuild project. I didn't get that problem again and my app successfully started.
For developers who live in Iran, Just rebuild while offline. You're done! (it's related to sanctions!)