I tried jdk8 (Oracle Java 8 Development Kit LTS) with android-sdk-25.2.5 and the bones patch you suggested, but I still run into troubles but looks like only for license reasons. That may be related to the fact I had to run everything as root, else my $ANDROID_HOME is not writable. That's what I did:

# export
# export
# ./bones

And I get:

NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

File could not be loaded.
Checking the license for package Android SDK Build-Tools 25.0.3 in
Warning: License for package Android SDK Build-Tools 25.0.3 not accepted.
Checking the license for package Android SDK Platform 16 in
Warning: License for package Android SDK Platform 16 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'AndroWishApp'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 16, Android SDK Build-Tools 25.0.3].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.768 secs