diff --git a/BUILD.gn b/BUILD.gn index 8c7c5bd4f32c7c..07b6bf81999dad 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -146,7 +146,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (chip_build_tests) { deps += [ "//src:tests" ] - if (current_os == "android") { + if (current_os == "android" && current_toolchain == default_toolchain) { deps += [ "${chip_root}/build/chip/java/tests:java_build_test" ] } }