fix rust build issue
- Commit
23265f87bf80bf8b2c28ef07c34175a6fec3c7af- Author
- Vayun Mathur <[email protected]>
- When
- 2026-07-07 06:55 UTC (5 months ago)
- Parents
c18eb37
Diff
.github/workflows/android.yml
diff --git a/.github/workflows/android.yml b/.github/workflows/android.ymlindex 2272a5e6e2..280724c4b4 100644--- a/.github/workflows/android.yml+++ b/.github/workflows/android.yml@@ -123,6 +123,9 @@ jobs: git commit -m "chore: prepare release $VERSION_NAME" || echo "No changes to commit" git tag "$VERSION_NAME" + - name: Install Android Rust Target+ run: rustup target add aarch64-linux-android+ - name: Build and Sign APKs run: | ./gradlew assembleRelease \
weather/build.gradle.kts
diff --git a/weather/build.gradle.kts b/weather/build.gradle.ktsindex b9a2f6f032..699fd5b579 100644--- a/weather/build.gradle.kts+++ b/weather/build.gradle.kts@@ -44,8 +44,14 @@ fun resolveSdkDir(): String = val cargoBin = "${System.getProperty("user.home")}/.cargo/bin" val ndkRoot = "${resolveSdkDir()}/ndk/$ndkVersionForRust" // The NDK ships an x86_64 host toolchain (runs under Rosetta on Apple Silicon).-val ndkBin = "$ndkRoot/toolchains/llvm/prebuilt/darwin-x86_64/bin"-val ndkSysroot = "$ndkRoot/toolchains/llvm/prebuilt/darwin-x86_64/sysroot"+val hostTag = when {+ org.gradle.internal.os.OperatingSystem.current().isMacOsX -> "darwin-x86_64"+ org.gradle.internal.os.OperatingSystem.current().isLinux -> "linux-x86_64"+ org.gradle.internal.os.OperatingSystem.current().isWindows -> "windows-x86_64"+ else -> error("Unsupported host OS for NDK toolchain")+}+val ndkBin = "$ndkRoot/toolchains/llvm/prebuilt/$hostTag/bin"+val ndkSysroot = "$ndkRoot/toolchains/llvm/prebuilt/$hostTag/sysroot" // (jniLibs ABI dir, Rust target triple) // Only arm64-v8a: the dev build type inherits the convention's