Cannot Open Project the length of the project file exceeds the limit of 100 characters

Viewed 10443

I am using Android Studio 3.1 Preview and get an error when I attempt to import some projects:

Cannot Open Project The length of the project file exceeds the limit of 100 characters

This error occurs whether I am importing cloned projects from github or old projects I have saved with Eclipse. Is there a way to import these projects?

9 Answers

I was facing same problem with Android Studio 3.1 in Linux. After some tests I concluded that it considers the FULL path as the project length (from /home/ to Project root), which cant exceed 100 characters.

This warning message is also shown when you try to create a new project.

I didn't found where to customize it. So, as a workaround, check if you can reduce this full path length.

Best Regards

I faced the same issue and solve this by limiting the character size. Try to limit your project name within 15 characters.

For example, if your project directory name like

some-name-of-the-project

then you need to adjust the name within 15 characters

some-name-of-th

I am looking for the setting to increase the length of the project name more than 15 characters.

Anyone having this problem, it is simple. In my cases, the project folder is in a multiple stack folder. What I did is, I copy it and paste it directly in D folder.

D:/project-file.

Dont D:/bla/bla-bla/project-file

You get this error if the number of characters in the full path(including the project root from /home or /Users) >= 100.

You can use this command to check: pwd | wc -c

I was facing same issue in android studio 3.1.3,when I change the project directory name to too short.Error clears.

For example, if your project directory name like

Testingandroidsamplesomeprojectname

Change to

Testing

In Android Studio 3.3.2. I have faced the same issue. Got following solution. 1.Best way to move your project from particular folder to another folder which contains the short path and then import from there. 2.If you don't want to move your project then try to open it by File -> Open. After that it may not build properly. Then just do File -> Re-Import Gradle Project. It will solve your problem.

Related