There is two ways to Setup the project and build on your computer:
Android Studio is Google's official IDE (integrated development environment) which is based on Jetbrain's IntelliJ IDEA for Android Operating System.
There is two ways for Setting up the project with Android Studio:
- After installing Android studio and setting up SDK, copy repo URL of template.
- Open Android studio and click on
Checkout project from version controland select the version control service on which your project being hosted on (usually it'sGit).
- Paste the copied repo URL and change directory of clone if necessary and click
Clone.
- Android studio will start cloning the repo.
- Android studio will throw a prompt saying whether you want to create android studio project for the checked out/cloned source. select
Yes.
- Android studio will now show import window. select
Import projects from external modeland clicknext.
- Android studio will now open Gradle setup window. click
Next.
- Open template repo and click on
Clone or downloadand selectDownload ZIP.
- Save and extract it.
- Open Android studio and click on
Import project (Gradle, Eclipse, ADT etc.).
- Browse to the extracted template directory and press
OK.
After importing project; Android studio will try to sync gradle. if the project using outdated gradle distribution. it'll throw a prompt to update gradle version manually. click
Update.
And the gradle synced successfully!.
Run is a very handy feature for testing new changes as quickly as possible. Run will compile the source and automatically installs to the device which is connected through ADB.
As theme template doesn't comes with any launchable activity; we need to tell Run configuration to launch nothing, So it can compile & install silently without launching any activity.
- Press
Appbutton and click onEdit configuration.
- Click on
Launch:and select activity toNothingand pressOK.
- Connect phone using USB and press
Runicon to start compiling and install into the connected device.
Android studio will open dialog with a list of devices connected to "ADB". Select the device you want Android studio to install the app after compilation.
Instant run is a latest feature of Android studio which pushes only updated code and resources to your connected device by performing swap which might cause issues with template as we do changes only on assets/ most of the time. So its recommended to disable Instant run.
- Open Android studio Settings.
- Select
Build, Execution, Deploymentand uncheck theInstant runoption and pressOK.
The command-line method is the simple & easiest way compared to Android studio method and its the recommended option for low-end or old PC's.
Before proceeding further, make sure Android SDK is installed and following environment variables are set:
JDK_HOME = JDK installed path
JRE_HOME = JRE installed path
ANDROID_HOME = Android SDK installed path
-
Either clone the template or download the template as a zip and extract it.
-
Open the cloned/extracted directory and hover mouse to empty area and
hold shift + right clickand selectOpen PowerShell window hereor if you're on older version of windows, selectOpen command line window here.
- Type and enter
./gradlew assembleDebug. Gradle wrapper will begin downloading dependencies and will setup everything automatically.
To build and install app to the connected device, enter
./gradlew installDebug.























