The template use the prefab feature for native dependencies. The prefab support is added from AGP 4.0 but only works correctly on higher versions. If you can't or don't willing to use APG 4.1, you can comment out prefab-related parts in build.gradle and copy riru.h from