Requirements

Installation

To launch Android task, you need to install :

  • JAVA 8 & JDK 1.8.x (integrated by default and needed for D8 & R8)
  • GRADLE 7 (included that will install AndroidX libs and Kotlin)
  • SDK & Android API (installed and targeted to an API level)
  • ADB (Android Debug Bridge)
  • AWS access

Environment Variables

You will have to configure some environment variables to make launch your project for Android, open your .bashrc file where your environment variables are defined and add this :

export CODEARTIFACT_INTERNAL_PROFILE="name_of_aws_profile_with_access_on_androidtv_repositories"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export ANDROID_HOME=”$ANDROID_SDK_ROOT”
export PATH="$PATH:$HOME/Android/Sdk/tools:$HOME/Android/Sdk/platform-tools:$HOME/Android/Sdk/build-tools/30.0.2"

Frequent issues

Path issues

Path can be different in function of where your Android SDK is installed or your jdk, gradle etc… If Android Studio is already launched, you will have to restart Android Studio. To have environment variables updated to your current terminal you can launch this command : source ~/.bashrc if you are on Linux and with bash.

Licence issues

  • If you have an error with a licence problem, you can launch this command in your terminal in Linux : yes | $ANDROID_SDK_ROOT/tools/bin/sdkmanager --licenses
    or
  • In Android Studio, go to Tools > SDK Manager , and in SDK tools tab, check “Google Play Licensing Library”

Version compatibilities

  • Don’t install a version > 7 of Gradle, incompatibilities could cause problems,
  • Don’t install version of java > 16, gradle is not compatible with version 17