According to the react-native docs, I have installed Android 8.0 (Oreo) and the rest of the instructions. The only difference is that I have defined the path varibales in .bashrc and not .bash-profile. when I want to run my react-native application I face the Build failed with an exception.
the log looks like below:
sudo react-native run-android Starting JS server... Building and installing the app on the device (cd android && ./gradlew installDebug)... Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. the project built for me does not contain the local.properties. but I already have ANDROID_HOME in the Path.
$ printenv | grep Android ANDROID_HOME=/home/amir/Android/Sdk PATH=/home/amir/Android/Sdk/tools:/home/amir/Android/Sdk/tools/bin:/home/amir/Android/Sdk/platform-tools:/home/amir/Android/Sdk/emulator