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?
In Android 3.1, if you are running up against the 100 character limit, instead of using Import project (File>New>Import Project), use File>Open, select your project, and then select the OK button.
I am not sure whether import offers some additional functionality beyond forcing you to rethink using long paths of > 100 characters. For my purposes, using the File>Open method allows the selection of projects with long paths and preserves existing directory structures.
With Windows environment you could try to create a virtual driver as I'm doing. Use the subst
command. For example I have the following giant path:
C:\Users\MyUser\Source\Demos\Android\ud851-exercises\Lesson02-GitHub-Repo-Search\T02.05-Exercise-CreateAsyncTask
Using the command subst E: "C:\Users\MyUser\Source\Demos\Android\ud851-exercises"
I can then import into Android Studio using the virtual path
E:\Lesson02-GitHub-Repo-Search\T02.05-Exercise-CreateAsyncTask
It worked for me since I don't want to change anything in the repository's path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With