Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native run-android ; SDK location not found, but it exists in the path #21105

Closed
AmirHMousavi opened this issue Sep 14, 2018 · 4 comments
Closed
Labels
Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@AmirHMousavi
Copy link

AmirHMousavi commented Sep 14, 2018

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:

Failure log

    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.

Environment Variables

$ 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

Environment

  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
      CPU: x64 Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
      Memory: 684.43 MB / 11.61 GB
      Shell: 4.4.19 - /bin/bash
    Binaries:
      Node: 8.11.2 - /usr/bin/node
      Yarn: 1.9.4 - /usr/bin/yarn
      npm: 6.4.1 - /usr/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1
@AmirHMousavi AmirHMousavi changed the title react-native run-android ; SDK location no found, but it exists in the path react-native run-android ; SDK location not found, but it exists in the path Sep 14, 2018
@react-native-bot react-native-bot added the Platform: Android Android applications. label Sep 14, 2018
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@v-rumak
Copy link

v-rumak commented Sep 14, 2018

@AmirHMousavi Have you tried to add local.properties manually?

@stale
Copy link

stale bot commented Dec 13, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 13, 2018
@stale
Copy link

stale bot commented Dec 20, 2018

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Dec 20, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Dec 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants