This page describes how to set up a development environment for Android Instant Apps onto a Linux, macOS, or Windows development machine.
Check your system requirements
To develop an instant app, you need the following:
- A development machine running Linux, macOS, or Windows.
- JDK 1.8
- Android Studio version 3.0 or later
- Make sure you have an environment variable called
ANDROID_HOMEthat points to the location of the Android SDK on your development machine.
In Android Studio, use the Android SDK Manager to install the following packages:
- Android SDK 6.0+
- Android SDK Build Tools 26.x or later
- Android SDK Tools 25.x or later
- Android SDK Platform Tools 25.x or later
- Android Support Library (latest)
- Android Repository (latest)
Install the Instant Apps Development SDK
- Open the Android SDK Manager by clicking Tools > Android > SDK Manager.
- Click the SDK Tools tab.
- From the list, select Instant Apps Development SDK.
- Click Apply.
- After the Component Installer completes the installation, click Finish.
For more information about how to use the Android SDK Manager, see Android SDK Tool Updates.
Set up your device or emulator
You can develop instant apps on the following devices and emulators:
Devices: Nexus 5X, Nexus 6P, Pixel, Pixel XL, Galaxy S7 running Android 6.0 or higher.
Emulator: Nexus 5X image running Android 6.0 (API level 23), x86, with Google APIs. Create the emulator as described in Create and Manage Virtual Devices.
To setup your device or emulator, follow these instructions:
Make sure you've signed into a Google account on the device or emulator. You can do this in the Settings app by tapping Accounts > Google. Note that you can use a test account for this purpose.
When you first run an instant app on your device or emulator, Android Studio installs or updates the following:
- Google Play Services - Android Instant Apps requires version 10.0.84 or higher.
- Google Play for Services for Instant Apps - the instant apps runtime.
- WH Dev Manager - a developer tool that lets you locally install and launch instant apps from your workstation (without deploying to Google Play).
To confirm that everything is configured properly, open the Settings app and navigate to Apps > Google Play Services for Instant Apps or run the command
adb shell pm list packages | grep "com.google.android.instantapps.supervisor".
The first time you navigate to a instant app, the system automatically asks you to opt-in as shown below.
You can also manually opt-in to or opt-out of Android Instant Apps in the Settings app by going to Google > Instant Apps. Note that if you do not opt-in, developer mode does not work on the device.
If you run into issues setting up your development environment or provisioning your device for Android Instant Apps, see Troubleshoot Development Issues.
Now that you set up your development environment, you can create a simple instant app.