0

I am trying to start up the Android simulator on my High Sierra MacBook Pro. I have followed these guides: React Native error: "Could not determine java version from '9.0.1'."

React Native android build failed. SDK location not found

JAVA_HOME is set to an invalid directory while running ./gradlew on OSX

None have been helpful. I want to get a successful build with the Android simulator on my MacBook for my React Native project.

This is the current error I am getting now when I run react-native run-android:

The SDK directory '/Users/username/Library/Android/sdk' does not exist

I ran an echo $PATH and there is nothing on the android sdk:

/Users/username/.rvm/gems/ruby-2.4.0/bin:/Users/username/.rvm/gems/ruby-2.4.0@global/bin:/Users/username/.rvm/rubies/ruby-2.4.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/opt/node@8/bin:~/.composer/vendor/bin:/Users/username/.rvm/gems/ruby-2.4.0/bin:/Users/username/.rvm/gems/ruby-2.4.0@global/bin:/Users/danale/.rvm/rubies/ruby-2.4.0/bin:/Users/username/.npm-global/bin:/Users/username/.rvm/bin:/Applications/DevDesktop/tools:/usr/local/Cellar/mysql/5.7.18/bin

Does this require installing Android Studio? I do not have a folder of Android inside of my /Library folder. What am I missing?

1 Answer 1

1

Simply put, you need to install Android Studio for that directory to be created. Open it up as if you are about to start a project. This will allow all the necessary folders and files to be downloaded to your MacBook.

Then you need to: cd /Users/username/Library/Android/sdk/tools/bin

Then run ./sdkmanager --licenses

This will prompt you through to accepting all the license agreements.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.