【问题标题】:How to update git submodules in Android Studio?如何在 Android Studio 中更新 git 子模块?
【发布时间】:2016-03-16 09:56:59
【问题描述】:
我正在尝试在 Android Studio 上的“https://github.com/jonasoreland/runnerup”上构建这个项目。但是当我要编译它时,我收到了这个错误:
我认为这是因为我必须更新 git 子模块,就像在指定运行以下命令以获取所有子模块的页面项目上所说的那样:
git submodule init && git submodule update
但我是 git 新手,我不知道该怎么做。
我问你是否可以一步一步地解释我如何做到这一点。
【问题讨论】:
标签:
git
android-studio
git-submodules
【解决方案1】:
你可以试试这个 git 命令
git submodule update --recursive --init
【解决方案2】:
选项 1
$ git clone https://github.com/jonasoreland/runnerup.git ./runnerup
$ git submodule init
$ git submodule update
选项2
$ git clone --recursive https://github.com/jonasoreland/runnerup.git ./runnerup
有关子模块的更多详细信息:https://git-scm.com/docs/git-submodule