Open AnDevi opened 8 months ago
@AnDevi I think this has been fixed in the latest commits in this repo.
rules_android_ndk/examples/basic$ bazelisk build java/com/app --android_platforms=//:arm64-v8a
INFO: Analyzed target //java/com/app:app (276 packages loaded, 26221 targets configured).
INFO: Found 1 target...
Target //java/com/app:app up-to-date:
bazel-bin/java/com/app/app_deploy.jar
bazel-bin/java/com/app/app_unsigned.apk
bazel-bin/java/com/app/app.apk
INFO: Elapsed time: 4.034s, Critical Path: 1.15s
INFO: 7 processes: 1 internal, 6 linux-sandbox.
INFO: Build completed successfully, 7 total actions
rules_android_ndk/examples/basic$ cat BUILD.bazel
platform(
name = "arm64-v8a",
constraint_values = [
"@platforms//cpu:arm64",
"@platforms//os:android",
],
)
platform(
name = "x86",
constraint_values = [
"@platforms//cpu:x86_32",
"@platforms//os:android",
],
)
I built this with rules_android_ndk commit b91e64f9135cbb7705d443a8af23832d01b4bfe2, Bazel 7.2.1, NDK r25c.
I'm using bazel
7.0.2
right now. Compilation with command:bazel build //apps/playground-android --fat_apk_cpu=arm64-v8a --android_crosstool_top=@androidndk//:toolchain --noincompatible_enable_android_toolchain_resolution
works fine.But I'd like to build it with command:
bazel build //apps/playground-android --android_platforms=//apps/playground-android:android_arm64_platform
android_arm64_platform
is defined like that:but unfortunately this command returns an error:
My WORKSPACE file looks like that (path to ANDROID_NDK_HOME is specified in env varaible) :
Am I missing something in command or in my configuration ? Or what else could be problematic ?