Make the library and demo code buildable for Android.

It can be only built but does not run well yet. During running,
Segmentation Fault happens. I will debug it later.