How to run my Android React Native project?

Hi,

This is the first time that I use this IDE (WebStorm) and React Native to build an App.

I was trying to run the project, followed the documentation on Internet but, no success.

Questions:

  1. How can I run the project using an Android Emulator?
  2. How can I run the project using a real device?
  3. How can I run the project using Wi-Fi? (without the need to connect a real device through USB)

Please, step by step, I'm new into this world.

5 comments

Hi,
I read it before and I couldn't run the project.

I received the following errors using react-native run-android:

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. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
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

I followed this steps to try to fix the issue but, no luck:

https://stackoverflow.com/questions/32634352/react-native-android-build-failed-sdk-location-not-found

What I need to do to fix this?

0

What did you do namely? What OS are you on?

Note that your problem has nothing to do with the IDE, you'd better post it to stackoverflow.com to get help from other users experiencing similar issues

-1

I'm using Windows 10.
I followed steps found on Internet every time I get an error.

Now, I received this error on my real device......

I followed this steps to fix the issue but, no luck yet.

  1. https://github.com/react-community/lottie-react-native/issues/269
  2. https://stackoverflow.com/questions/48563283/unable-to-load-script-from-assets-index-android-bundle

Any idea?.

0

no idea, sorry. as I wrote, you'd better ask this at stackoverflow

0

Please sign in to leave a comment.