Skip to content

Latest commit

 

History

History
31 lines (29 loc) · 1.41 KB

android.md

File metadata and controls

31 lines (29 loc) · 1.41 KB

Build Android

Prerequisites:

  • Stable rust toolchain.
  • Android SDK. The version mentioned in this build.gradle, at the targetSdkVersion field.
  • Android NDK. Set the environment variable ANDROID_NDK_HOME to the NDK's location.
  • Native development support for cargo:
cargo install cargo-ndk
  • Android targets for cargo:
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

Steps:

  • In /libs/lb/lb_external_interface run make android.
  • Choose one:
    1. Command Line
      • In clients/android run ./gradlew assemble.
      • The APK will be located at clients/android/app/build/outputs/apk/debug.
    2. Android Studio
      • Download and install Android Studio.
      • In Android Studio open Lockbook Android at the /clients/android.
      • Configure Android Studio to use the SDK installed.
      • Build the APK using the hammer button on the toolbar. Once built, the bottom information bar will give you the option to locate the APK (clients/android/app/build/outputs/apk/debug/).
      • You can also run the APK directly on your device:
        • Enable USB debugging on your Android device.
        • Connect it to the machine running Android Studio.
        • On the toolbar, you will be given the option to directly run the APK on your device.