Skip to content
This repository was archived by the owner on Oct 12, 2019. It is now read-only.
Robert Ford edited this page Mar 22, 2017 · 16 revisions

Setup

Contents

  1. Setup Android Studio SDK
  2. Install Oracle VirtualBox and Genymotion
  3. Starting Genymotion
  4. Install Genymotion Plugin for Android Studio
  5. Install Git
  6. Setup Firebase
  7. Create Project in Android Studio
  8. Register local git repository with project
  9. Problems and Gotchas

Setup Android Studio SDK

  1. Go to https://developer.android.com/studio/index.html
  2. Click Download Android Studio
  3. Install the downloaded .exe
  4. From the Welcome to Android Studio Setup screen, select Next.
  5. From Choose Components screen, deselect Android Virtual Device and select and then Next.
    • Optionally, from Choose Components screen, leave default selection (Android SDK and Android Virtual Device) and select Next.
  6. From the License Agreement screen, select I Agree.
  7. From the Configuration Settings screen, select the desired location for the Android Studio Installation and Android SDK Installation.
  8. From the Choose Start Menu Folder, select the desired location.
  9. Click Next when finished.
  10. From Completing Android Studio Setup, click Finish.

Install Oracle VirtualBox and Genymotion

  1. Download VirtualBox 5.1.14 from http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-Win.exe
  2. Install the downloaded .exe.
    • Note - when installing VirtualBox, in the Custom setup window, make sure VirtualBox Networking is enabled.
  3. From the Welcome to the Oracle VM VirtualBox 5.1.14 Setup Wizard, select Next.
  4. From the Custom Setup screen, select Next.
  5. Choose desired shortcuts, and select Next.
  6. If presented with the Warning: Network Interfaces screen, select Yes.
  7. From the Ready to Install screen, select Install.
    • If presented with the Windows Security - Would you like to install this device driver dialog, select Install.
  8. From the Installation Complete screen, select Finish.
    • Optionally, unselect Start Oracle VM VirtualBox 5.1.14 after installation.
  9. From https://www.genymotion.com/download/ download the version without VirtualBox
  10. Run the exe
  11. From the Select Setup Language, select English and click OK
  12. From the Select Destination Location, select Next
  13. From the Select Start Menu Folder, select Next
  14. From the Select Additional Tasks screen, select Next
    • Optionally, deselect Create a desktop shortcut
  15. From the Ready to Install screen, select Install
  16. From the Completing the Genymotion Setup Wizard screen, select Finish

Starting Genymotion

  1. From the Usage notice dialog, click Accept
  2. From the Add a first virtual device screen, click Yes.
  3. From the Select a new virtual device screen, click Sign in
  4. Sign in
  5. Select an appropriate device (Samung Galaxy S6 - 6.0.0 - API 23 - 1440x2560)
  6. From the Virtual device name, click Next to accept the default name.
  7. Wait for the device files to download, and then click Finish

Install Genymotion Plugin for Android Studio

  1. Go to File > Settings (in Android Studio)
  2. Select Plugins and click Browse repositories.
  3. Right-click on Genymotion and select Download and install.
  4. From the Download and Install dialog, click Yes.
  5. Restart Android Studio
  6. Click the Genymotion Device Manager button .
  7. Browse to the Genymotion install directory and click OK.
  8. Click the Genymotion Device Manager button again.

Install Git

  1. Download 32 or 64 bit installer from https://git-scm.com/download/win
  2. Launch exe
  3. From Configuring the line ending conversions, select Checkout as-is, commit Unix-style line endings and click Next
  4. Accept all other default options and complete installation
  5. From Windows Start menu, select Git > Git Bash
  6. Enter git config --global "Your Name"
  7. Set user email:
    • Enter git config --global user.name "email-address@example.com"
    • From app directory (contains .git directory) enter git config --local user.email "email-address@example.com"

Setup Firebase

Add Google Play services SDK to Android Studio

  1. Select Tools > Android > SDK Manager
  2. From the SDK Tools tab, select Google Play services.
  3. If there is an update available for Google Repository (denoted by a minus in the box), select it.
  4. Click OK
  5. Launch Firebase assistant by selecting Tools > Firebase

Install Google play in Genymotion

  1. https://gist.github.com/wbroek/9321145
  2. Drag the Genymotion-ARM-Translation_v1.1.zip file to the emulator
  3. Select OK on the File installation warning dialog
  4. Launch a console and change to Android SDK directory ex. \Users<username>\AppData\Local\Android\sdk\platform-tools. Can be found from Android SDK Location in Default settings > Appearance & Behavior > System Settings > Android SDK.
  5. Issue adb reboot command
  6. Drag the appropriate gapps to the emulator and select OK from the File installation warning dialog.
  7. Issue adb reboot command again
  8. If presented with a an error about the Google Play store having a problem, select OK.
  9. From Genymotion, launch the Play Store
  10. Sign into the Play Store
  11. Update Google apps, click the hamburger icon to open the navigation drawer, and select My Apps, then click Update in the Google apps.
  12. Search for Netflix and Google drive to verify installation successful.

For Android M (Marshmallow) devices, see https://z3ntu.github.io/2015/12/10/play-services-with-genymotion.html

Create Project in Android Studio

Note: this section assumes that Git is installed as described above

  1. Clone the Git project using either the Git GUI or Git bash
    • Git GUI:
      1. Launch a Git GUI
      2. Select Clone Existing Repository
      3. Enter https://github.com/rford1223/MealBuddy in Source Location.
      4. Enter the directory where the repository will be stored locally.
      5. Click the Clone button.
    • Git bash:
      1. Launch a Git bash session
      2. Change directory to the parent directory where the repository will be stored locally.
      3. Clone the repository into a new directory <local_dir> with the following command:
        • git clone https://github.com/rford1223/MealBuddy <local_dir>
  2. Launch Android Studio
    • If an existing project opens, select File > Close Project
    • Should see a screen similar to following:
  3. Select Open an existing Android Studio project.
  4. Navigate to the local clone of the repository, and select the MealBuddy directory beneath there and click the OK button.

Register local git repository with project

  1. Select File > Settings > Version Control
  2. Select the project root directory in the Unregistered roots and click the green plus button.
  3. Click OK to close the Settings dialog.

Problems and Gotchas

INSTALL_FAILED_VERIFICATION_FAILURE

When installing the debug APK to a Genymotion device, Android Studio issues a INSTALL_FAILED_VERIFICATION_FAILURE error.

  1. Launch the Genymotion device
  2. Run the adb shell command, usually found in \Users<username>\AppData\Local\Android\sdk\platform-tools
  3. From the adb shell enter, settings put global verifier_verify_adb_installs 0