What error are you getting? If it does not compile, make sure you include <android / log.h>, also in Android.mk:
LOCAL_LDLIBS := -llog
If it compiles, but does not produce any output, then, as @Warpzit said, you need to look at logcat to see your posts.
source share