For building instructions read Shattered Pixel Dungeon Readme. You need Java 8 to build android releases. APK files built with Java 9+ will crash upon application launch.