Mobile development

2 min read

Learn how to develop mobile apps with Coder.

Compiling mobile applications are resource-intensive, but Coder allows you to leverage cloud resources to save time compiling while still keeping your native emulator experience.

Android

You can use the Android emulator on your local machine to build and debug apps developed remotely on Coder.

  1. Install Android Studio onto your local machine.

  2. Start Android Studio, and when prompted, install the SDK.

    Android SDK
Install

  3. Create and start a Virtual Device. Android Device

  4. Create an environment variable called ANDROID_SDK_PATH and set it to the installation path of your Android SDK (for example, it's typically ~/Library/Android/sdk on macOS and C:\Users\<USER_NAME>\AppData\Local\Android\sdk on Windows).

    Android SDK
Path

  5. Start the Android Debug Server on port 5555:

$ $ANDROID_SDK_PATH/platform-tools/adb tcpip 5555
restarting in TCP mode port: 5555
  1. Create a Coder environment that includes the Android SDK; you can do this by including the following in your Dockerfile:
FROM codercom/enterprise-android

Alternatively, you can import or extend Coder's image)

  1. Forward your Android Debug Server to the remote environment:
# You must have the Coder CLI installed.
$ coder config-ssh
$ ssh -R 5555:127.0.0.1:5555 coder.<NAME_OF_YOUR_ENVIRONMENT>
  1. Run adb devices to view the emulators forwarded from your local machine:
$ adb devices
List of devices attached
emulator-5556
  1. Build and run your Android applications remotely:
./gradlew android:installDebug

Our docs are open source. See something wrong or unclear? Make an edit.