In Android Studio, when I import a project downloaded from link,
I get an error as
"Invalide VCS root mapping" The directory C:\Users\username\Desktop\video_diary-master is registered as a Git root, but no Git repositories were found there.
In Android Studio, go to File > New > File from Version Control > GitHub. Then log in with your GitHub username and password and select your old project's repository name from the list of your GitHub repos. Continue through the import wizard and you should end up with your old project in Android Studio.
For the Invalid VCS root mapping error, you can fix it by deleting the vcs. xml file located in the . idea folder of your project and then Reopen your IDE.
does not a appear to be a git repository” error is triggered when you try to clone, or run other commands, in a directory that is not recognized as a Git repository. The directory or remote file path might not have initialized Git, or the file path you are trying to access as an active repository is incorrect.
In my situation I didn't have to work with git, I just wanted to run the project that I had downloaded and that was prompting me this error
On Android Studio 3.0 I clicked on Configure in the popup window appeared on the bottom right corner
This automatically opened a window [accessible as well through File->Settings] on Version Control tab. I selected the first item in the bigger list and I removed it clicking on the red minus sign
After this the error should disappear
There is a .idea
folder within the repository which shouldn't be there. Inside it are vcs related files which might contain a path not on your PC.
Make sure there is a .git
folder within the project fold er on your PC. If not then you'll have to clone the project properly if you need the vcs tools enabled. Here's a link on how to do that: Git Basics, search for Cloning an Existing Repository
Then, you'll need to close Android Studio, delete the .idea
folder and then open Android Studio again. It'll recreate the .idea
folder and problem should be resolved.
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