Android studio Error File Path too long on Windows keep below 240 characters

After adding new play store dependency in Android studio gradle file i started getting the error “File Path too long on Windows keep below 240 characters

The mistake was, the project location folder structure was looking too big. After modifying the gradle file, android studio use to throw the error.

File Path Too Long Error

Looks like there is limitation of 240 character in windows, To overcome this issue, simply create project with small and simple folder hierarchy for eg:

“C:\Android_Example\Hello_World”,

Android studio project location