Fdroid local build does not download NDK

I followed the Submit to fdroid quick start, but my app does not build because NDK 27.0.12077973 and fdroid does not download it.

The metadata file:

Categories:
  - Connectivity
  - Internet
  - Security
  - System
License: GPL-3.0-or-later
SourceCode: https://github.com/***/***

RepoType: git
Repo: https://github.com/***/***.git

Builds:
  - versionName: 1.0.3
    versionCode: 10
    commit: v1.0.3
    sudo:
      - apt update
      - apt install -y build-essential openjdk-17-jdk-headless
    output: ***.apk
    build: FDROID_NDK="$$NDK$$" ./build-fdroid.sh
    ndk: 27.0.12077973

AutoUpdateMode: None
UpdateCheckMode: None

Output of fdroid build in the docker container:

vagrant@2a893aa2408c:/build$ fdroid build io.github.***
2024-12-03 19:50:43,305 INFO: Building version 1.0.3 (10) of ***
2024-12-03 19:50:43,305 WARNING: Android NDK version '27.0.12077973' could not be found!
2024-12-03 19:50:43,305 WARNING: Configured versions:
2024-12-03 19:50:43,305 ERROR: Could not build app ***: fdroidserver.exception
2024-12-03 19:50:43,306 INFO: Build for app ***:10 failed
2024-12-03 19:50:43,307 INFO: Finished
2024-12-03 19:50:43,307 INFO: 1 build failed

Please help me

fdroid build --verbose appid

So we see the full error message

Do you have sdkmanager from Debian Bookwork Backports installed?

If not, add to sudo: this:

      - apt-get install -y -t bookworm-backports sdkmanager

Why censor the repo address?

Thank you for your reply.

I fixed the problem by running sdkmanager --install "ndk;27.0.12077973" before fdroid build io.github.**.

And you are right, there is no need to censor the repo address. I just opened a merge request Add XiVPN (!17227) · Merge requests · F-Droid / Data · GitLab :grinning:

1 Like