React Native on Android failed to find Build Tools
Solution 1:
Probably you need to update your Build Tools.
I faced the problem when I tried to update from the graphic interface, it didn't show the exact minor version, so I couldn't update to it.
It was solved by looking at the available versions from the terminal with:
android list sdk -a
[...]
Packages available for installation or update: 156
1- Android SDK Tools, revision 24.4
2- Android SDK Platform-tools, revision 23.0.1
3- Android SDK Platform-tools, revision 23.1 rc1
4- Android SDK Build-tools, revision 23.0.1
[...]
And installing the right version with:
android update sdk -a -u -t 4
Solution 2:
Just a note - it's possible to get this error because the only version of the build tools you have installed is too new.
I got precisely the error that the OP got (complaining that react-native couldn't find Build Tools revision 23.0.1). When I checked my Android SDK Manager, I saw this:
I'd naively thought that installing the latest version of the Build-tools (23.0.2 at the time of writing) would work, but apparently not. Additionally installing 23.0.1 fixed the problem.
Solution 3:
I also had problem with newer version of SDK Build tools (same as Mark) but I managed to resolve it with modification of android/app/build.gradle
and setting proper version, e.g.
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
...
UPDATE: As Mark suggested, it is wise only update minor (or patch) version in this way. Another reason why not to update this version is when you have plenty of 3rd party libs with native part - you might end up updating all of them. So you must weight possible benefits of newer version vs a bit more work.
Solution 4:
Need modify 4 files
grep buildToolsVersion * -r | grep 23.0.1
Examples/Movies/android/app/build.gradle: buildToolsVersion "23.0.2"
Examples/UIExplorer/android/app/build.gradle: buildToolsVersion "23.0.2"
ReactAndroid/build.gradle: buildToolsVersion "23.0.2"
local-cli/generator-android/templates/src/app/build.gradle: buildToolsVersion "23.0.2"
Solution 5:
I had to change my Android project's build.gradle
to:
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.demoproject"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}