Android SDK manager fails with this message:
Downloading SDK Platform Android 8.1.0, API 27, revision 1 Download finished with wrong size. Expected
EDIT (For others):
Using the sdkmanager tool instead of the deprecated android tool prevents the validation error. It looks like someone at Google forgot to update the checksums of SDK Platform 8.1.0 for the android tool.
EDIT (For Travis CI):
Current recommended workaround is to add
before_install:
- yes | sdkmanager "platforms;android-27"
to your .travis.yml file to use the sdkmanager to download the API 27 platform.
I just encountered the same issue a few hours ago while using Travis CI, so I manually uninstalled and reinstalled my local android-27 package, expecting the reinstallation to fail with the same error. To my surprise though, it succeeded when I ran ./sdkmanager.bat "platforms;android-27" --verbose after uninstalling it.
The only difference I can tell is Travis CI using the deprecated android command instead of the modern sdkmanager command, but the deprecated android command correctly redirects to the sdkmanager command in my local SDK.
My exact error message, which is the same:
Download finished with wrong size. Expected 65606517 bytes, got 65738431 bytes.
There is now an issue on the Travis CI GitHub: https://github.com/travis-ci/travis-ci/issues/8874