Previous  | Next  | Home

Packages for All Projects


Packages for all projects are available from the GitHub archive To install a project in Android Studio from the list of projects on that page use one of two procedures:


Install Using Version Control

This procedure assumes that you have already enabled GitHub version control in Android Studio, according to the instructions in Version Control. Note: to download public archives (such as the projects described here) from GitHub you do not have to have a GitHub account, but one is required if you want to version control your own projects.

  1. Click on the desired project in the list. (Alternatively, there is a link to the GitHub page for the project at the end of each project in this tutorial.)

  2. In the resulting window, click on the dropdown menu in the Clone or download button.

  3. In the dropdown window that results, use the Copy to Clipboard button to copy the web URL displayed to the clipboard.

  4. From the Android Studio homescreen, select Check out project from Version Control > GitHub. (Alternatively, from the Android Studio Interface select VCS > Checkout from Version Control > GitHub.) In the resulting popup window paste the GitHub URL copied to the clipboard above into the top field, fill out the desired Parent Directory and Directory Name fields, and click Clone to install in Android Studio.

The project may now be edited in Android Studio in the usual way.


Install a Downloaded ZIP Archive

Alternatively, instead of copying to the clipboard in step 3 above,

  1. Click Download Zip.

  2. Unzip the downloaded archive in an appropriate directory.

  3. Choose Open from the Android Studio menu, navigate to the directory containing the project just unzipped, and select it.

This should open the project in Android Studio.

Note that when installing sample packages in Android Studio you may sometimes get error messages indicating that the required SDK version or build tool version for the project are not compatible with those that you currently have installed. Usually these error messages will have links that you can click that will either fix the problem automatically or give instructions on how to fix it. If this does not provide a solution, Google the error message (paste the string into a Google search field), which will usually provide links to further information on how to fix the problem.

You may also get error messages about missing files. Usually these are innocuous because in storing a project in a repository some files that are regenerated in each build of the project are deliberately omitted and it is not important if they are missing. If the project runs when executed, these missing files may be ignored. (But if the project will not compile and run, then the missing files may correspond to real errors.)

Last modified: July 9, 2016

Previous  | Next  | Home