My GitLab pipeline is failing when it tries to run fastlane build_apk
. It fails when it is trying to configure react-native-video:
> Configure project :react-native-video
useExoplayerIMA:false
Warning: Dependant package with key emulator not found!
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Failed to install the following SDK components:
build-tools;30.0.3 Android SDK Build-Tools 30.0.3
Install the missing components using the SDK manager in Android Studio.
And if I install the mentioned build-tools;30.0.3
, it gives me this error:
$ sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" --include_obsolete
Warning: Dependent package with key emulator not found!
Warning: Unable to compute a complete list of dependencies.
Here is my gitlab.config.yml
:
variables:
LANG: "en_US.UTF-8"
# ANDROID_COMPILE_SDK: "33"
# ANDROID_BUILD_TOOLS: "33.0.3"
# ANDROID_SDK_TOOLS: "9477386"
SECURE_FILES_DOWNLOAD_PATH: './'
ANDROID_KEYSTORE_FILE: '/builds/X/app/android/my-upload-key.keystore'
clean-build-job:
stage: build
image: openjdk:11-jdk
before_script:
# # Update package list and install required packages
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget unzip curl ruby ruby-dev build-essential libffi-dev libgmp-dev
- curl -sL https://deb.nodesource.com/setup_19.x | bash -
- apt-get install -y nodejs
# Install Fastlane
- gem install bundler
- bundle install
- export ANDROID_SDK_ROOT="${PWD}/android-home"
- install -d $ANDROID_SDK_ROOT
- wget --output-document=$ANDROID_SDK_ROOT/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
# move to the archive at ANDROID_SDK_ROOT
- pushd $ANDROID_SDK_ROOT
- unzip -d cmdline-tools cmdline-tools.zip
- pushd cmdline-tools
- mv cmdline-tools tools || true
- popd
- popd
- export PATH=$PATH:${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin/
# Nothing fancy here, just checking sdkManager version
- sdkmanager --version
# use yes to accept all licenses
- yes | sdkmanager --licenses || true
- sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" --include_obsolete
- sdkmanager "platform-tools" --include_obsolete
- sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" --include_obsolete
- npm i @react-native-community/cli-platform-android
- cd android
script:
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- ./gradlew --stop
- gem install bundler
- bundle install
- fastlane build_apk
New contributor
Wee Li is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.