Configure IntelliJ IDEA such that source detected

2019-01-31 21:37发布

Unregistered Vcs root detected
The directory C:\Users\Andrew is under Git, but is not registered in the Settings.
Configure Ignore VCS root errors

Why is this showing ?

5条回答
2楼-- · 2019-01-31 22:11

For me, just VCS -> Enable Version Control integration did the trick. Having used IntelliJ in the past (Which is much similar to AndroidStudio, the latter is modeled after the former I believe), I've noticed the version control has to be enabled for each project when it's created/imported.

查看更多
萌系小妹纸
3楼-- · 2019-01-31 22:12

Look for "Version control" in preferences and set up what VCS should be used: screenshot

You have to set this up in order to access function like revert, commit etc from the IDE.

See also, the documentation on Version Control

查看更多
时光不老,我们不散
4楼-- · 2019-01-31 22:23
  1. In the error message you have the options "Configure" or "Ignore". Click "Configure".
  2. Settings window will open. Click the "Add root" option. In my case I only had one path on the list to choose from. I selected that path. Please see the image I have included below.

Snapshot of Version Control settings

  1. Click Apply, then click OK.
查看更多
该账号已被封号
5楼-- · 2019-01-31 22:27

Steps are given below to sort out this issue:

  1. Click on Configure option
  2. Select Directories under Unregistered roots
  3. Hit + button at the right side of pane.

And you are good to go.

查看更多
我只想做你的唯一
6楼-- · 2019-01-31 22:31

This occurs because Android Studio has detected that you have git projects imported but they have not been "registered" to track their status in Android Studio. Your project will not be negatively affected if you choose not to configure this, IntelliJ only prompts you because it has some integrated version control features that will not be able to function.

So if you want to take advantage of ItelliJ's built in version control options or just get rid of an annoying warning, its an easy fix.

Just register all of the projects you want to have the version control IDE integrations for in the Preferences > Version Control section. You should see this screen:

enter image description here

The UI is a little confusing, but all you need to do is select one of the directories under the Unregistered roots: section and then click the + button in the lower left corner of the window. If you have added all the directories you should see the Unregistered roots: disappear and you should no longer receive this warning.

You can select each directory and use the + and - buttons to determine which projects should use VCS in Android Studio

查看更多
登录 后发表回答