読者です 読者をやめる 読者になる 読者になる

Satomi and Dogs

バーチャルな世界に住んでいた料理好きSatomiが美味しいご飯と犬と動物たちと牧草に囲まれた生活を目指す日記です

1.1 When I tried to run Android app by ReactNative, Error "failed to find Build Tools revision 23.0.1" has shown up

React Native

When I tried to run Android application implemented by React Native on Mac(Mavericks), errors below has shown up.

$ react-native run-android

JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

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

* 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: 5.203 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

問題はこいつです。

failed to find Build Tools revision 23.0.1

AndroidSDK Path is ok.

export ANDROID_HOME="/Users/watashi/Library/Android/sdk"
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Tool seems to be installed via Android Studio. But something went wrong.

Solution

Show SDK list.

$ android list sdk -a

.
.
.
Packages available for installation or update: 160
   1- Android SDK Tools, revision 24.4.1
   2- Android SDK Tools, revision 25.0.1 rc2
   3- Android SDK Platform-tools, revision 23.1
   4- Android SDK Build-tools, revision 23.0.2
   5- Android SDK Build-tools, revision 23.0.1
... and a great many more

I found target SDK at no.5

$ android update sdk -a -u -t 5

.
.
.
Installing Archives:
  Preparing to install archives
  Downloading Android SDK Build-tools, revision 23.0.1
  Installing Android SDK Build-tools, revision 23.0.1
    Installed Android SDK Build-tools, revision 23.0.199%)
  Done. 1 package installed.

Now everything goes well.

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