When you get this error, it usually means that the person who you imported the project from was using the Git VCS(Version Control System) but, if you're not using it, you can turn it off.
To do this, go to File >> Settings >> Version
Control and make sure that the box is empty (Apart from the andplaceholders):
You may also need to clear the path to Git which you can do under the Git heading (Just make sure the box is blank again):
Then, hopefully the error will go away (You may need to restart Android Studio).
If after that, you get this message:
You can just press Ignore VCS Root Errors.
I believe this is just when Android Studio detects a .git file in the project directory. It might also go away if you delete the .git file from your File Explorer I think (I use git so I can't test whether this works or not):
Either way should work though :)
If you are using Git however, you should specify the correct path to your git.exe file under the Git heading shown above and the problem will be fixed.
本文提供了解决在Android Studio中导入使用Git版本控制系统项目的常见错误的方法,包括如何在设置中禁用Git,忽略VCS根错误,以及在使用Git时正确指定路径。
1293

被折叠的 条评论
为什么被折叠?



