Android Studio 3.1.1 CreateProcess error=206, The filename or extension is too long

I guess you are the windows user, there is a file path limit of 8191 in Windows XP and above.

The simplest way this shorten the file path, like change the project folder into D:, and refact your project path, and always use ASCII chars for the folder name. UTF-8 chars use 2-3 bytes.
or move useless dependency.
or change to MAC platform. 😉

The reason is at the compile step, there is a command like javac xxxx, combine all dependences’s path in one line.

For me this worked.

  1. Go to Build -> Clean.
  2. File -> Invalidate Cache and Restart


It might be due to network issue. Please check connectivity.

Leave a Comment