I am trying to build my first app with react-native.
I am following these 2 tutorial:
- https://facebook.github.io/react-native/docs/getting-started.html#content
- https://facebook.github.io/react-native/docs/android-setup.html
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:
I executed this command while running genymotion.
This is all that I have installed in Android SDK:
I tried to install Android build tools 23.0.1 but I get this error:
What should I do?
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.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.I had this error:
When you got updated/installed:
Change version number in
build.gradle
FROM
TO
How to find what Build Tools version you have
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....
Check your $ANDROID_HOME, sometimes is /usr/local/opt/android, but it's not your install sdk path, change it and fix this problem
I faced the same problem and I solved it doing the following:
Go to /home/[USER]/Android/Sdk/tools and execute:
Which will show a list like:
... and many more
Then, execute the command (attention! at your computer the third option may be different):
It will install the 23.0.1 SDK Platform-tools components.
Try to build your project again.