Search code examples
gitandroid-studiogit-submodules

Accessing git submodule in Android Studio


I'm just starting out using source control for my own project, and now I want to add Joda-Time. I want to add it as a submodule so I went into the terminal and executed:

git submodule add https://github.com/JodaOrg/joda-time.git

and it downloaded all the files successfully. Then I ran:

git submodule init

And got nothing back.

git submodule status

returns

b9fe534c7f5876eced6494a6d6c1deaf2528a579 joda-time (v2.7-17-gb9fe534)

I checked my projects root directory and I see the new joda-time directory and it's source. But now how do I access the library in my project? Did I miss a step?


Solution

  • I wasn't able to have any luck with the answers provided. As I kept searching the internet for a hint of help I stumbled across Joda-Time-Android so I removed the original Joda-Time submodule and tried again with the new. It works! It added itself to my project and it's ready to rock!

    During the time I was still troubleshooting the original issue Joda-Time doesn't include a build.gradle file but Joda-Time-Android does - I think that was the problem.