project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.42k stars 1.99k forks source link

[Build] how to use android nkd to build linux project like chip-tool or bridge-app #35836

Open HiconKong opened 1 week ago

HiconKong commented 1 week ago

Build issue(s)

`sdk_target_sysroot="/workspace/android-ndk-r24/toolchains/llvm/prebuilt/linux-x86_64/sysroot"

toolchain="/workspace/android-toolchain/bin" ndk="workspace/android-ndk-r24" gn gen \ --args="\ sysroot=\"$sdk_target_sysroot\" \ target_cpu=\"arm\" \ treat_warnings_as_errors=false \ import(\"//build_overrides/build.gni\") \ custom_toolchain=\"\${build_root}/toolchain/custom\" \ target_cc=\"$toolchain/aarch64-linux-android-gcc\" \ target_cxx=\"$toolchain/aarch64-linux-android-g++\" \ target_ar=\"$toolchain/llvm-ar\" " \ ./out/android

ninja -C ./out/android`

image

Platform

android

Anything else?

No response

HiconKong commented 1 week ago

any other news?