We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation. If there's a problem with translations on this page, please let us know.

How to Compile the Android Version

  1. First setup the development environment, see How to Setup the Development Environment.
  2. Gradle (command line):
    • Specify environment variables. ANDROID_SDK and ANDROID_HOME are where Android studio places things:
    export ANDROID_SDK=/[your-path]/Android/sdk
    export ANDROID_NDK=/[your-path]/android-ndk-r17b
    export ANDROID_HOME=/[your-path]/Android/sdk
    
    • Compile with command line
    cd android/OsmAnd && ../gradlew assembleNightlyFreeLegacyFatDebug
    
  3. Android Studio:
    import android project and run module flavor `android.OsmAnd`
    
  4. You may use our debug.keystore to make builds compatible with the nightly build.

Gradle tasks / flavors

Gradle task assembleNightlyFreeLegacyFatDebug will produce apk at android/OsmAnd/build/outputs/apk/ nightlyFreeLegacyFat/debug/OsmAnd-nightlyFree-legacy-fat-debug.apk. Task name assembleNightlyFreeLegacyFatDebug consists of :

  • assemble - standard task to build apk
  • nightlyFree - build flavor described below
  • legacy - legacy / opengl / opengldebug - defines whether produced apk will have native libraries to use opengl map rendering or not. More information in Development plugin.
  • fat - fat (all native targets) / armv7 / arm64 / x86 / armonly - select which native libraries will be inside apk.
  • debug - debug / release - standard task

To build bundle you could use bundle${FLAVOR}LegacyFatRelease.

FlavorPackageDescription
nightlyFreenet.osmand.devNightly free build that could be installed next to both of GPlay versions for testing and exploring needs
androidFullnet.osmand.plusFull OsmAnd~ version could be used for F-Droid builds. Doesn't use GooglePlay services.
amazonFreenet.osmandAmazon OsmAnd - doesn't use GooglePlay services
amazonFullnet.osmand.plusAmazon OsmAnd+ - doesn't use GooglePlay services
gplayFreenet.osmandGoogle Play OsmAnd version - uses GooglePlay services.
gplayFullnet.osmand.plusGoogle Play OsmAnd+ version - uses GooglePlay services.
huaweinet.osmandSpecial build for Huawei market - uses Huawei services but not Google Play

Did this doc help you?

Privacy policy

Help us make these docs great!

All OsmAnd docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

Все еще нужна помощь?

Join OsmAnd community Поддержка