Wednesday, March 9, 2016

Fix Jenkins error for Android build, missing sdk #.#.#

Error: failed to find Build Tools revision 23.0.2


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.2

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

BUILD FAILED

Solution:


$android list sdk -a
Which showed me the following list:
1- Android SDK Tools, revision 24.0.2
2- Android SDK Platform-tools, revision 23.0.2
... and a great many more
Followed by the command:
$android update sdk -a -u -t 2
It will install the 23.0.2 SDK Platform-tools components. DONE. Run Build again in Jenkins.


Example below:

Andress-MacBook-Pro:tools andres$ pwd
/Users/Shared/Jenkins/Home/tools/android-sdk/tools

Andress-MacBook-Pro:tools andres$ ls
android ....  .....
....  ...   ...
.... ... ...

Andress-MacBook-Pro:tools andres$ ./android list sdk -a
Refresh Sources:
  Fetching https://dl.google.com/android/repository/addons_list-2.xml
  Fetched Add-ons List successfully
  Refresh Sources
  ...
  Parse XML:    https://s3.amazonaws.com/android-sdk-manager/redist/addon.xml
Packages available for installation or update: 170
   1- Android SDK Tools, revision 24.4.1
   2- Android SDK Tools, revision 25.0.9 rc10
   3- Android SDK Platform-tools, revision 24 rc1
   4- Android SDK Build-tools, revision 24 rc1
   5- Android SDK Build-tools, revision 23.0.2
   6- Android SDK Build-tools, revision 23.0.1

Andress-MacBook-Pro:tools andres$ sudo ./android update sdk -a -u -t 5

Reference:
http://stackoverflow.com/questions/27272605/failed-to-find-build-tools-revision-21-1-1-sdk-up-to-date

No comments:

Post a Comment