See how Capacitor fits into the entire Ionic Ecosystem ->
Capacitor is part of the Ionic Ecosystem ->

Capacitor Android Documentation

Capacitor features a native Android runtime that enables developers to communicate between JavaScript and Native Java or Kotlin code.

Capacitor Android apps are configured and managed through Android Studio.

Android Support

API 21+ (Android 5 or later) is supported, which represents over 95% of the Android market. Capacitor requires an Android WebView with Chrome version 50 or later. On Android 5 and 6, Capacitor uses the Android System WebView. On Android 7+, Google Chrome is used.

Adding the Android Platform

First, install the @capacitor/android package.

npm install @capacitor/android

Then, add the Android platform and sync your app. Learn more about sync.

npx cap add android
npx cap sync android

Opening the Android Project

To open the project in Android Studio, run:

npx cap open android

Alternatively, you can open Android Studio and import the android/ directory as an Android Studio project.

Running Your App

You can either run your app on the command-line or with Android Studio.

To use an Android Emulator you must use an API 24+ system image. The System WebView does not automatically update on emulators. Physical devices should work as low as API 21 as long as their System WebView is updated.

Running on the Command-Line

To run the project on a device or emulator, run:

npx cap run android

The command will prompt you to select a target. Learn more about run.

Running with Android Studio

In Android Studio, first select the device or emulator and then click the run or debug button to run your app. Unless you’re debugging Java or Kotlin code, the run button is preferred.

Running App

Troubleshooting

If you encountered any issues while getting started, you can consult the Android Troubleshooting Guide. Feel free to open a discussion if you need help.

Next Steps

If your app ran you are now ready to continue developing and building your app. Use the various APIs available, Capacitor or Cordova plugins, or custom native code to build out the rest of your app.

Further Reading

Follow these Android-specific guides for more information on setting permissions for your app, updating dependencies, building plugins, and more:

Configuring and setting permissions for Android ›

Building Native Plugins for Android ›

Previous
<- Troubleshooting
Next
Configuration ->
Contribute ->