Setting Up Sample Projects in Android Studio

The SalesforceMobileSDK-Android GitHub repository contains sample apps you can build and run.

  1. If you haven’t already done so, clone the SalesforceMobileSDK-Android GitHub repository.

    • Mac:

    • Windows:

  1. Open the project in Android Studio.

    • From the Welcome screen, click Import Project (Eclipse ADT, Gradle, etc.).

      OR

    • From the File menu, click File | New | Import Project....

  1. Browse to <path_to_SalesforceMobileSDK-Android*>/native/NativeSampleApps/ or <path_to_SalesforceMobileSDK-Android*>/hybrid/HybridSampleApps/
  2. Select one of the listed sample apps and click OK..
  3. When the project finishes building, select the sample project in the Select Run/Debug Configurations drop-down menu.
  4. Press SHIFT-F10.