I'm also getting this error. All my buildtools version numbers are identical (in all gradle files and travis.yml), but the issue doesn't seem to be that the license isn't accepted. If I scroll up in the log, it looks like travis doesn't find 25.0.2 when filtering.
To fix this, I explicitly included tools before build-tools-25.0.2 at the top of travis.yml
It took a couple builds because I had linting enabled and couldn't figure out the correct way to turn it off, but ignore that and note the change in the travis configuration.