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

FAILURE: Build failed with an exception. #20573

Closed
masumbillah opened this issue Aug 8, 2018 · 9 comments
Closed

FAILURE: Build failed with an exception. #20573

masumbillah opened this issue Aug 8, 2018 · 9 comments
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@masumbillah
Copy link

MSs-Mac-mini:tojbhi ms$ sudo react-native run-android
Password:
Scanning folders for symlinks in /Users/ms/dev/apps/tojbhi/node_modules (40ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...

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.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.802 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

@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.

@masumbillah
Copy link
Author

My evn .bash_profile

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

@hramos hramos added Platform: Android Android applications. and removed 📋No Environment Info labels Aug 8, 2018
@masumbillah
Copy link
Author

masumbillah commented Aug 9, 2018 via email

@shivangi4742
Copy link

Hi Masumbillah ,

I'm getting the same issue. Have you resolved ? if yes then please suggest

Building and installing the app on the device (cd android && gradlew.bat installDebug)...

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.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.578 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

@masumbillah
Copy link
Author

Yes I solved It @shivangi4742
Please checked local.properties file in your app folder. If this file is not existing then create local.properties and add your sdk link
sdk.dir=/Users/<yourUserName>/Library/Android/sdk.

I faced more error in my app. finally solved every things. and run my app.

@shivangi4742
Copy link

@masumbillah ,Thank you so much. i solved that one .

now I'm getting this error.

Building and installing the app on the device (cd android && gradlew.bat installDebug)...

Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

please suggest , because I'm running this app in windows , and I'm unable to connect the emulator on my laptop.

thanks,
shivangi

@masumbillah
Copy link
Author

@shivangi4742 at first open your emulator.

  1. start your react-native sudo react-native start
  2. Run your app sudo react-native run-android

@shivangi4742
Copy link

@masumbillah
Is it possible to debugging the app on my mobile?

I'm having trouble starting my android emulator. Nothing appears to load. I'm getting Emulator: Process finished with exit code 1.

so please suggest. what should i do?

@kelset
Copy link
Contributor

kelset commented Aug 14, 2018

Does look to me that this is a react-native side issue but a local config. Closing unless I get strong evidences and a repro to prove it.

@kelset kelset closed this as completed Aug 14, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Aug 14, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants