support android build

I fixed code by your comment.
Re-submit PR.