在Android Studio 3.5.3中使用Github克隆项目后,为什么本地内容与远程内容不同?

时间:2019-12-30 12:21:08

标签: git android-studio github

我从Android Studio 3.5.3中的https://github.com/syslogic/camera-samples/tree/1.0.0-alpha08用Github克隆了一个项目。

Web URL为https://github.com/syslogic/camera-samples.git

我很奇怪为什么本地内容与远程内容不同。

远程内容位于https://github.com/syslogic/camera-samples/blob/1.0.0-alpha08/CameraXBasic/app/build.gradle

远程代码为def camerax_version = "1.0.0-alpha08",您可以看到图片1。

本地代码为def camerax_version = "1.0.0-alpha06",您可以看到图片2。

我怎么了?

图片1

enter image description here

图片2

enter image description here

1 个答案:

答案 0 :(得分:1)

您如何获得存储库?我怀疑是

git clone https://github.com/syslogic/camera-samples.git

,您获得了 master 分支。在master中的code is def camerax_version = "1.0.0-alpha06"

要转到分支1.0.0-alpha08,您需要切换branches

git checkout 1.0.0-alpha08

或Android Studio中的等效版本。