We are developing an SDK which will be rolled out to our clients, as well as several apps which will use the SDK. In order to develop the SDK, its easiest to have a master project - such as a test app which has the SDK included as a module. This allows it the source to be available during debugging and is much easier to make bug fixes to the SDK.
My expectation was that when using Android Studio to create a "New Project from Version Control" (file menu) that the submodules specified in .gitmodules
would be cloned also, however this is not the default behavior. When performing this action on a repo with .gitmodules
, and the settings.gradle
has an include
statement for the module (makes sense right?), AS displays an error of a VCS root with no source. "Is registered as git root, but no git repositories were found there"
git clone --recursive
?My goal is to reduce friction for new developers on my team. I am considering just using SourceTree (which automatically clones submodules) or writing the git commands required as a reference, however I prefer when things work as expected via the IDE.
The environment is Android Studio 1.5.1 & git 1.9.X - both windows 7 and OSX.
For the invalid VCS root mapping error, you can go to the root of the project, and create a git repo by git init
.
You can also fix it by deleting the vcs.xml
file located in the .idea
folder of your project and then Reopen your IDE
Thanks
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