You have not accepted the license agreements of the following SDK component

1,335 views

Hi,

I'm trying to build my app with ReactNative in Windows.Building it for Android and my CLI works, but when i run, the build is always failing. This is the build output:


Your environment has been set up for using Node.js 6.3.1 (x64) and npm.

​C:\react\b>react-native run-android
Scanning 551 folders for symlinks in C:\react\b\node_modules (18ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat install
Debug)...
Checking the license for package Android SDK Platform 23 in C:\Users\Gail\Ap
pData\Local\Android\android-sdk\licenses
Warning: License for package Android SDK Platform 23 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 23].
Before building your project, you need to accept the license agreements and comp
lete the installation of the missing components using the Android Studio SDK Man
ager.
Alternatively, to learn how to transfer the license agreements from one workstat
ion to another, go to http://d.android.com/r/studio-ui/export-licenses.html

* 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: 14.868 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/android-setup.html


asked Mar 12, 2017 by Gail (140 points)

1 Answer

Hi Gail,

This sounds like an issue in Android SDK. Better do the followings and see how it goes

  • Install a fresh copy of the Android SDK again
  • Make sure to put correct paths
  • If you run it on your device, make sure both are(device and the machine) in the same network. 
  • Make sure your Anti-virus / Firewall in your computer  not blocking  your device.

Good luck

answered Mar 12, 2017 by Rush Wijenayake (220 points)
...