How to compile Android library

I want to make a library for android app, but PackageCompiler doc didn’t tell how to do it.