Simple question about Android libs setup

What I just wrote as pseudo code is described on the page I linked.