Reputation: 880
I searched the internet over for a solution to this problem and maybe I was just using the wrong keywords:
I imported an open source library module to my Android project that was previously version controlled as SVN. I use Git and after deleting all of the .svn folders I successfully committed the library to Git by command line. However, even after doing this Android studio still highlights them as red meaning they are unknown to the VCS. When I try to add the module to VCS through Android Studio it brings up a massive error saying that each file is not recognized by .svn! I have deleted all the .svn files so I have no idea where the issue would lie.
Any suggestions for debugging (or easier ways to eliminate all SVN and put into Git) would be appreciated.
Upvotes: 2
Views: 656
Reputation: 880
I was eventually able to solve the problem in the ".idea/vcs.xml" file in my project root. Here's the issue:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/sdktools" vcs="svn" />
</component>
</project>
By deleting the line:
<mapping directory="$PROJECT_DIR$/sdktools" vcs="svn" />
Android Studio was able to see that the files had been indeed added to git and now display normally.
The only other step I took to get rid of SVN was manually deleting all of the .svn files hidden in each directory. If there is a more simple way to do this through command line/git please feel free to post.
Upvotes: 4