Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Install Error

I am consistently running into the same error when I run "react-native run-android." Here is the error:

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

I tried this --> failed to find Build Tools revision 21.1.1 - sdk up to date --> and got the same error.

I installed the android sdk with homebrew and my ANDROID_HOME export is in my .bash_profile and .zshrc file as:

export ANDROID_HOME=/usr/local/opt/android-sdk

When I go to this directory and look in the "build-tools" directory I do see 23.0.1.

Does anyone have any advice?

EDITS:

I'm also unable to run "react-native run-android" with any flags. I'm not seeing any output from stacktrace, info or debug.

enter image description here

like image 721
Max Baldwin Avatar asked Jul 25 '26 21:07

Max Baldwin


1 Answers

Finally figured it out! Chris Geirman's answer is also valuable, so I would start there as I did. One thing to mention is that I installed React Native with Homebrew. If Chris's method does not work look into the following:

  1. Go to your React Native project directory that is created by react-native init
  2. Open the android directory.
  3. Open the file local.propertiesIf you don't have this file you can make one.
  4. Make sure the sdk.dir value is pointing to the correct directory. In my case the path need to be sdk.dir = /usr/local/opt/android-sdk

As an extra bit of reassurance I also located that directory above to make sure that the build tools version that was missing (23.0.1) was in that directory.

EDIT:

I found that this is a post install error. If you run react-native init and you don't have $ANDROID_HOME set, you will run into this error.

like image 144
Max Baldwin Avatar answered Jul 27 '26 10:07

Max Baldwin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!