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

What does this error mean and how can I solve it?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
Dave
  • 141
  • 2
  • 14

6 Answers6

1

I tried Android-Studio in committing projects and Tortoise SVN, seems like tortoise-svn does the job unlike android-studio's plugin which is SVN. I dont really understand why, but Tortoise-svn is working so I think this could be an answer.

Make long story short: The temporary-fix is using Tortoise Svn rather than using Android-Studio's SVN.

Dave
  • 141
  • 2
  • 14
  • I got the same error, but I'm not using SVN at all (all GIT), so it shouldn't be the problem. – Orabîg Nov 11 '15 at 11:57
  • That`s not related to SVN check this question and see first answer it solve problems of many developers. https://stackoverflow.com/questions/49981137/android-studio-3-1-1-createprocess-error-206-the-filename-or-extension-is-too-l/49981764 – Asad Mukhtar Jan 07 '20 at 20:47
0

Windows has a max path length of 260 characters. See max path length of 260 characters. See Android Studio - Unable to open PNG file

akadouri
  • 128
  • 6
  • i dont quite get the solution. but thanks to your answer though. the thing im troubled is that i tried tortoise svn. but it works and in android-studio doesnt. – Dave Sep 23 '14 at 04:05
  • Could be a bug with android studio that tortise svn fixed. Submit it to the android studio bug report site! – akadouri Sep 23 '14 at 04:07
0

According to another thread the "svn cmd absolute path" works, but the relative one "cd /your/project/path;svn cmd yourproject" doesn´t (It´s a Windows File System "Problem")

Android Studio seem to work with relative paths, Tortoise with absolute. The error message also says

cannot run program ( IN directory .../.../yourproject)

Which confirms this assumption.

Hopefully they will change it in future!!

Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
0

I had the same problem and installing Tortoise SVN didn't solve it. I proceeded to commit individual directories in my project step by step, trying to find the file/directory that was causing the problem. My surprise was when I finished all commits and no error had arised.

So the solution for my problem was to commit all my files/directories step by step.

Fer
  • 1,956
  • 2
  • 28
  • 35
0

I know the thread is a bit old but here is a a work around for googlers ,

Android Studio gives you the exact address of the folder which can not be committed:

Error:Cannot run program "svn" (in directory "c:\blah-blah"): CreateProcess error=206, The filename or extension is too long

Unless AS or Microsoft does something for supporting file names longer than the current limitation, here is a couple of workarounds to pass this :

1- to commit the given folder c:\blah-blah using another svn client eg. TortoiseSVN

2- to move your project folder closer to the root of the drive, for example if your project is in d:\Development\Android Studio\sources\project x\Version 3\... try to move it closer to the root, by removing and/or renaming in between folders like: d:\dev\as\src\x\v3\... or d:\x\v3\...

3- I read somewhere that creating a virtual drive in windows from the last folder would work too, for example, create a z:\ and assign it to d:\Development\Android Studio\sources\project x\Version 3\ but I read somewhere else that this might not work cause the AS svn client work with absolute path of files, any way I made the job done with options 1 and 2 and never got to try the third option

Muhammad Naderi
  • 3,090
  • 3
  • 24
  • 37
0

The error is often produced when too many files are commited at once and the command line client is used; as the files are delivered to the client in one line, the line becomes too long (svn commit file1 file2 ...). See also SVN commit fails when committing lots of files in one commit (resulting svn command length exceed the limit). My solution to this problem was to uncheck "Use command line client" in the settings under "Version Control - Subversion".

cirko
  • 211
  • 2
  • 13
  • Thats not related to SVN because of that i face this issue even i don`t user SVN, check this link and see first answer you have better idea of why you face this issue. https://stackoverflow.com/questions/49981137/android-studio-3-1-1-createprocess-error-206-the-filename-or-extension-is-too-l/49981764 – Asad Mukhtar Jan 07 '20 at 20:49