The project can now be compiled with ndk and in AOSP.