I'm trying to run react-native project without android studio.I'm using Genymotion.
I've configured the Genymotion correctly and virtual device is being created for me.
I've
installed react-native cli
created the project of react-native
cd into that project
but
Problem
when I try to run react-native run-android
it says the following :
info Starting JS server... info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Configure project :app Checking the license for package Android SDK Platform 28 in C:\Users\\AppData\Local\Android\android-sdk\licenses Warning: License for package Android SDK Platform 28 not accepted.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':app'.
Failed to install the following Android SDK packages as some licences have not been accepted. platforms;android-28 Android SDK Platform 28 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\Users\Mehmood khan\AppData\Local\Android\android-sdk
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 10s error 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 error Command failed: gradlew.bat app:installDebug
I found the following method to solve the above problem:
to accept the license of SDK go into the folder: C:users//appdata/local/android/android-sdk/tools/bin
and run the following command: sdkmanager --licenses and then accept the licence, it will work
but it gives me this
bash: sdkmanager: command not found
Goal :
I want that when I run react-native run-android
, it should open up the genymotion virtual device having the brand new project welcoming react native, how can I do that ?
I'm totally new to android development, I set some environment variables, but I don't know what are they used for, please tell me if I'm doing anything wrong.
Note:
I don't have installed android studio
, I've just downloaded the SDK tool, I don't know if absence of android studio makes some issue.
Any help will be highly appreciated.