LogoLogo
🚀 Run Maestro tests in the cloud →
  • Home
  • Star us on GitHub
  • Getting Started
    • What is Maestro?
    • Installing Maestro
      • macOS
      • Windows
      • Linux
    • Build and Install your App
      • Android
      • iOS
    • Run a Sample Flow
    • Writing Your First Flow
    • Maestro Studio
    • Running Flows on CI
  • Cloud
    • Run Maestro tests in the cloud
    • Cloud Quickstart
    • CI Integration
      • GitHub Actions
        • Maestro GitHub Action for Android
        • Maestro GitHub Action for iOS
        • Maestro GitHub Action for Flutter
      • Bitrise
      • Bitbucket Pipelines
      • CircleCI
      • Integration with any CI platform
    • Pull Request Integration
    • Cloud Reference
      • Build your app for the cloud
      • Configuring OS Version
      • Configuring device locale
      • Device timezones
      • Email Notifications
      • Slack Notifications
      • Webhook Integration
      • Managing Secrets
      • Limits
      • Reusing App Binary
      • IP Allowlist
      • System Status
  • Platform Support
    • Supported Platforms
    • Android - Views
    • Android - Jetpack Compose
    • iOS - UIKit
    • iOS - SwiftUI
    • React Native
    • Flutter
    • Web Views
    • Web (Desktop Browser)
  • Examples
    • Android contacts flow automation
    • Facebook signup flow automation
    • Advanced: Wikipedia Android
    • Page Object Model
  • CLI
    • Cloud
    • Test Suites & Reports
    • Tags
    • Record Your Flow
    • Continuous Mode
    • View Hierarchy
    • Start Device
  • API Reference
    • Commands
      • addMedia
      • assertVisible
      • assertNotVisible
      • assertTrue
      • assertWithAI
      • assertNoDefectsWithAi
      • back
      • clearKeychain
      • clearState
      • copyTextFrom
      • evalScript
      • eraseText
      • extendedWaitUntil
      • extractTextWithAI
      • hideKeyboard
      • inputText
      • killApp
      • launchApp
      • openLink
      • pressKey
      • pasteText
      • repeat
      • retry
      • runFlow
      • runScript
      • scroll
      • scrollUntilVisible
      • setAirplaneMode
      • setLocation
      • startRecording
      • stopApp
      • stopRecording
      • swipe
      • takeScreenshot
      • toggleAirplaneMode
      • tapOn
      • doubleTapOn
      • longPressOn
      • travel
      • waitForAnimationToEnd
    • Common command arguments
    • Selectors
    • Configuration
      • Workspace configuration
      • Flow configuration
      • AI configuration
  • Advanced
    • Nested Flows
    • Wait
    • Loops
    • Conditions
    • Parameters & Constants
    • JavaScript
      • Run JavaScript
      • Outputs
      • Logging
      • Access element text
      • Make HTTP requests
      • GraalJS support
      • JavaScript announcement blog
    • Specify a Device
    • Configure Permissions
    • Detect Maestro in your app
    • Configure Maestro driver timeout
    • onFlowStart / onFlowComplete hooks
    • Test in different locales
    • Structuring your test suite
  • Troubleshooting
    • Known Issues
    • Frequently Asked Questions
    • Bug Report
    • Rollback Maestro
    • Debug Output
    • HOWTOs
      • Arrange your repository for Maestro tests
      • scrollUntilVisible for fragments
  • Community
    • Contributions
    • Articles & Tutorials
    • Case Studies
    • Resources
Powered by GitBook

Read to wire into CI or scale up your testing?

  • Run Maestro tests in the cloud →
On this page
  • Building with Gradle
  • Building with Flutter
  • Building with Other Frameworks
  • Running on an Emulator

Was this helpful?

Edit on GitHub
  1. Getting Started
  2. Build and Install your App

Android

PreviousBuild and Install your AppNextiOS

Last updated 1 month ago

Was this helpful?

This assumes you've got the Android SDK bits already installed.

If you haven't, and especially if you happen to be using a Mac, this video will take you all the way from zero, through the prequisites, to a running Emulator.

Maestro works with most apps, but there are a few requirements:

  • APK (AAB not supported)

  • Compatible with x86_64 architecture

  • Requires Android API level 26 or newer

  • Release and Debug builds both supported (although Release builds are often better)

Building with Gradle

Build your app using one of the commands below. Then find the appropriate APK file in the build/outputs/apk/ output directory.

# Release build
./gradlew assembleRelease

# Debug build
./gradlew assembleDebug

Building with Flutter

If you use Flutter to build your app you can create a build using the following command:

# Release build
flutter build apk

# Debug build
flutter build apk --debug

You can then find the built apk in the build/app/outputs/folder.

Building with Other Frameworks

We're not going to attempt to cover all the possible ways you could build an app. React Native and Expo both have their standard ways (and, like Gradle, can be customised by the developers to follow any pattern that suits the team). Some rather refined developers might even provide a makefile.

Running on an Emulator

Once that's done, you can you either drag-n-drop the APK onto the running emulator, or run

adb install /path/to/app.apk

If you've not already got an emulator running, start one now. You can do that with the Android SDK tools, through the Android Studio, or via Maestro's command.

Start Device