Fix Android library instantiation order