By Polo D. Vargas


2016-04-18 00:29:22 8 Comments

I am trying to build my first app with react-native.

I am following these 2 tutorial:

I am sure that I installed all the requirements from the second link but when I try running my app with react-native run-android, I get the following error:

Error

I executed this command while running genymotion.

This is all that I have installed in Android SDK:

enter image description here

enter image description here

I tried to install Android build tools 23.0.1 but I get this error:

enter image description here

What should I do?

13 comments

@Gian Gomen 2019-01-21 03:18:37

Two solutions: You have to instal the required buildToolVersion or set it as described above.
Notice that if you are trying to set the buildToolsVersion "23.0.3" using Android Studio 3.0 or more it won't work until you remove all builversion you have keeping just one last version you use. I read this somewhere else and this works for me. Hope this helps.

@Waqleh 2018-06-01 14:38:54

If you already install the correct Android SDK Platform-Tools (Build Tool) and you still get an error, try to invalidate the cache; File -> Invalidate caches / Restart....

@Dary 2016-10-03 09:56:24

You should install Android SDK Build Tools 23.0.1 via Android SDK. Don't forget to check Show Packages Details.

I had the same problem before, it worked for me.

Image

@arco444 2016-10-03 10:24:08

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

@Dary 2016-10-08 03:54:07

Ok, edited. thanks

@Navid_pdp11 2016-12-11 17:06:14

there is no 23.0.1 version in my sdk manager in windows

@birender 2017-08-02 05:26:55

I had to remove build build tools using SDK manager firstly and then add it again. It fixed the issue.

@Tomer 2018-02-23 00:42:13

Hi, for future googlers: if the version you are looking for does not exist press the box Show Package Details

@Natim 2018-04-20 12:39:21

I had to install both the platform (details + Google API) and the tools.

@Faris Rayhan 2018-04-30 06:26:02

This kind of thing helps me :). Simple just check the checkbox then apply

@Jonatan Collard Bovy 2016-04-18 00:37:03

The error you're getting seems to be related to system's permissions, since it's not able to create a folder.

Try running the sdk-manager using root (with su or sudo commands).

@stkent 2016-04-18 00:40:49

Good spot, +1 if you choose to stick with the existing build tools version.

@Bampu 2017-02-16 10:08:04

I had this error:

Failed to find Build Tools revision 23.0.2

When you got updated/installed:

  1. Android SDK Build Tools
  2. Android SDK Tools

Change version number in build.gradle

FROM

buildToolsVersion "23.0.2"

TO

buildToolsVersion "25.0.2"

How to find what Build Tools version you have

@stkent 2016-04-18 00:31:02

Either install v23.0.1 of the build tools (the fifth row in your screenshot), or change your code to use the build tools version you already have installed (v23.0.3). This can be specified in your app's build.gradle file:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        ...
    }
}

As per duncanc4's comment below,

The build.gradle file you want to edit is in the android/app folder within your project directory.

@Polo D. Vargas 2016-04-18 00:37:40

i tried installing it but i get the error in the last image. How do i choose what build tool version to use?

@Jonatan Collard Bovy 2016-04-18 00:52:56

He's using react-native, so i'm not sure how much access he's got to the build.gradle file.

@stkent 2016-04-18 00:56:03

Interesting, the build is still obviously using gradle under the hood (see the terminal snapshot) so I would expect it to be hiding in there somewhere...

@Juan De la Cruz 2017-12-07 16:42:18

With Android Studio 3.0.1 and Gradle 4.3.1 there is no buildToolsVersion property, so I added it into defaultConfig (in the same file) and it stopped showing the error.

@stkent 2017-12-07 18:35:53

As of v3.0.0 of the Android Gradle plugin, the build tools version is automatically determined based on the plugin version (but can be overridden, I believe).

@noɥʇʎԀʎzɐɹƆ 2018-02-07 02:00:31

On my system, Android SDK Manager showed /usr/local/Cellar/android-sdk as the SDK path, when $ANDROID_HOME was /Users/james/Library/Android/sdk. I just added a symlink for the correct build tools version.

@naoufal zerai 2018-01-22 21:24:20

Just install it from Android Studio ;) enter image description here

@Futal 2018-01-16 15:40:19

In the Gradle Console (link available in the window bottom right), you have two tabs: the error is shown in Gradle Build tab. Click on the Gradle Sync tab, then click on the Install Build Tools XX.X.X and sync project link. This will download the build version required by your project.

You may also change your project SDK version but you don't always have this option if it is imposed.

@owaishanif786 2017-02-05 02:40:48

While running react-native In case you have installed 23.0.3 and it is asking for 23.0.1 simply in your application project directory. Open anroid/app/build.gradle and change buildToolsVersion "23.0.3"

enter image description here

@Aymeric Bouzy aybbyk 2017-01-20 09:22:31

Nothing helped until I found this solution : https://stackoverflow.com/a/39068538/3995091

In Android SDK, the build tools with the correct version where shown as installed, but still I got the same error saying they couldn't be found. When I used the above solution, I found out they were indeed not installed, although Android SDK thought they were. Installing them solved it for me.

@xiongjiabin 2016-07-04 09:40:53

Check your $ANDROID_HOME, sometimes is /usr/local/opt/android, but it's not your install sdk path, change it and fix this problem

@Addison 2017-01-07 14:23:08

Thankyou so much. I've been going in circles for hours between Failed to find Build Tools revision *.0.0 and install build tools *.0.0 and sync project. On Windows, I added ANDROID_HOME="C:\Users\Administrator\AppData\Local\Android\s‌​dk" as a system variable. Finally works.

@Gustavo Soler 2016-05-02 20:42:07

I faced the same problem and I solved it doing the following:

Go to /home/[USER]/Android/Sdk/tools and execute:

$android list sdk -a

Which will show a list like:

  1. Android SDK Tools, revision 24.0.2
  2. Android SDK Platform-tools, revision 23.0.2
  3. Android SDK Platform-tools, revision 23.0.1

... and many more

Then, execute the command (attention! at your computer the third option may be different):

$android update sdk -a -u -t 3

It will install the 23.0.1 SDK Platform-tools components.

Try to build your project again.

@4aRk Kn1gh7 2016-08-24 05:39:40

thanx man, this solution worked for me.

@Tabares 2016-09-07 23:25:27

It's working, attention the number could be different.

@Abdennour TOUMI 2016-09-24 18:28:07

Works fine on mac also . Thanx man

@lead_brogrammer 2016-11-20 05:07:43

worked for me - android studio is installed at ~/Library/Android/sdk/tools on mac

@Lukas 2016-12-12 12:02:17

It installed revision 25.0.1 not 23.0.1

@Manwe 2016-12-14 06:26:34

@LukasLiesis From the first command android list sdk -a check what number 23.0.1 gets. It will change over time. Yesterday it was 12. So the install command was android update sdk -a -u -t 12

@Lukas 2016-12-14 09:14:08

@Manwe how can i get that number? P.s. already installed required version with sdk manager, but still, for future googlers :-)

@Manwe 2016-12-14 09:30:52

@LukasLiesis android list sdk -a lists a lot on the screen. Lines start with NUMBER- . It's one of those. Most likely 12 today. If you are a linux user you can find it with grep: android list sdk -a | grep 23.0.1

@Ishita Sinha 2017-04-26 06:22:27

bash: android: command not found :(

@Alexandre Couret 2017-08-11 15:42:58

Thanks, by the way ./android is deprecated, now in /home/[USER]/Android/Sdk/tools/bin you can run ./sdkmanager --list to get the same result After that I fixed it by finding a build-tools version that was matching a version found in sdk/extras/android/m2repository/com/android/support/appcompa‌​t-v7

@shridutt kothari 2017-11-28 07:48:06

Thanks It works !!!

Related Questions

Sponsored Content

40 Answered Questions

39 Answered Questions

[SOLVED] Can't start Eclipse - Java was started but returned exit code=13

41 Answered Questions

[SOLVED] How do I find all files containing specific text on Linux?

15 Answered Questions

10 Answered Questions

[SOLVED] Error Running React Native App From Terminal (iOS)

6 Answered Questions

43 Answered Questions

[SOLVED] Update Eclipse with Android development tools v. 23

8 Answered Questions

[SOLVED] Android error: Failed to install *.apk on device *: timeout

Sponsored Content