React Native: How to solve SDK location not found

As I said before, when We find an errors in anywhere in programmings, the best solution for our problem is follow the message instructions and find where the something wrong located.

In this case, I found errors when running my last React Native project, and I got this erros:

Now look at the *what went wrong part, focus at this segment,

The errors tell us that SDK location not found, as you know that react native need SDK to run the Android project, and sometimes the SDK have different location according to instalation process.

Back to the errors, it said that wee need to create some file called local.properties and defined the sdk.dir to where we were installed the SDK.

So, I touch new file in andoird/ in project, called local.properties, and using nano I fill the file:

sutriman is my folder, so you can custom it as you need. I install the SDK using Android Studio, so in Linux it by default installed in home folder, and auto-create new file called /Android/Sdk.

I think enough, hope it will be usefull for me and you are. Keep learning 🙂