The version of gradle being used was out of date, update to a later version to fix building of uiauto apks.
The older versions of the plugin caused problems building with newer NDK versions due to a lack of MIPS support. This also required upgrading to a version of Gradle that knows about the Google Maven repository.
Uiautomator1 has been deprecated, therefore the uiautomation base classes have been upgraded to use uiautomator2 and the new gradle build system.