Android Studio 3.5.2中GitHub克隆选项缺失,如何克隆GitHub仓库?
How to Clone a GitHub Repository in Android Studio 3.5.2 (Missing "Cloning from GitHub" Option)
Hey there! I’ve dealt with this exact missing option issue in older Android Studio builds before—don’t worry, there are a few straightforward ways to get your GitHub repo cloned successfully.
Method 1: Clone Directly Using the Git URL (Works Every Time)
This method bypasses the need for the "Cloning from GitHub" option entirely:
- Open Android Studio. On the welcome screen, select Get from Version Control. If you already have a project open, go to
File > New > Project from Version Control. - In the pop-up window, ignore the missing GitHub option for now. Paste your full GitHub repository URL (e.g.,
https://github.com/your-username/your-repo.git) into the URL field. - Choose a local directory where you want to save the project, then click Clone. Android Studio will handle the rest.
Method 2: Link Your GitHub Account to Restore the Option
The missing "Cloning from GitHub" option is often because your Android Studio isn’t connected to your GitHub account. Here’s how to fix that:
- For Windows/Linux: Go to
File > Settings > Version Control > GitHub. For Mac: Go toAndroid Studio > Preferences > Version Control > GitHub. - Click Add Account, then log in using your GitHub credentials or a personal access token (tokens are more secure, especially if you have 2FA enabled).
- Once logged in, go back to the Get from Version Control screen. You should now see the "Cloning from GitHub" option—you can search for your repository directly or select from your list of repos.
Method 3: Clone via Terminal (For Command Line Fans)
If you prefer using the command line, this is a quick alternative:
- Open the Terminal in Android Studio (find it in the bottom toolbar, or go to
View > Tool Windows > Terminal). - Navigate to the folder where you want to store your project, e.g.,
cd ~/AndroidProjects. - Run the command:
git clone https://github.com/your-username/your-repo.git - After cloning finishes, go to
File > Openin Android Studio, select the cloned folder, and the project will load up.
A quick note: Android Studio 3.5.2 is a fairly old version, so its UI differs from newer builds—but all the methods above should work perfectly for it.
内容的提问来源于stack exchange,提问作者Jack
相关产品推荐
相关产品推荐

