C++ for android

I am trying to implement a simple training code in C++.
The target is the Android environment based on the ndk toolchain.
Instead of an apk, I try to build it as a shard or executable with cmake.
I’m struggling with the lack of manuals.
I’m looking for a simple example with guide.