Quick start guide for Developers
February 2, 2022 ยท View on GitHub
-
Fork the Git repository.
- Go to the main Github repo and click "Fork".
-
Clone your fork to your local machine.
- Click "Clone" on your fork's Github page, and copy the Git URL. It should look like:
git@github.com:yourname/apps-android-commons.git
- Click "Clone" on your fork's Github page, and copy the Git URL. It should look like:
-
Open the project in Android Studio.
- Open Android Studio
- In the menu bar, click
File>New>Project from Version Control...>Git
OR
(if Quick Start menu open):Get from Version Control>Git - Enter the Git URL you obtained in step 3.
- Specify a local directory you would like to save the project in and select
OK.
-
Start contributing! Be sure to read through the developer workflow and the code style guide.
Building the source code
You can build the beta and prod flavor of the app for debug build type using the Android Studio. Read up more about flavors and build types here. Several features are not usable with the beta flavor. The only advantage of the beta flavor is that you can do test modifications and upload test pictures without getting banned. Please do not upload any copyrighted picture though, you would get banned even on the beta environment.
You can either directly invoke the following commands using your terminal or you can edit configurations in android studio and add these configs.
To build the beta debug variant use:
:app:installBetaDebug
To build the prod debug variant use:
:app:installProdDebug
Note:
- You can also build and test the
releasevariant for bothbetaandprodbut you would need to use your own signing keys for it. Read up more about signing keys here. Building and testingreleasevariant might be required when you are debugging an issue that is happening just onreleasebuilds and not ondebugbuilds. Most likely it should be a proguard issue.
Frequent issues
- Issue:
Cannot run program "git" (in directory "<project path>"): CreateProcess error=2, The system cannot find the file specified
Fix: Make sure git is installed and added in the PATH environment variable. Don't forget to restart the machine after updating your PATH environment variable.
Did you run into other problems? Please add any issue which is not captured here along with its fix. If you don't have edit permissions, submit a new issue.