i was testing to run the first project in react native, and when i run the command “react-native run-android” and appear an error in android SDK license.
I am newbie in react native so sorry anyway.
[bruno@bruno-pc AwesomeProject]$ react-native run-android
info JS server already running.
info Installing the app…
Configure project :app
Exception while marshalling /opt/android-sdk/build-tools/28.0.3/package.xml. Probably the
SDK is read-only
Exception while marshalling /opt/android-sdk/platform-tools/package.xml. Probably the
SDK is read-only
Exception while marshalling /opt/android-sdk/tools/package.xml. Probably the SDK is read-
only
Exception while marshalling /opt/android-sdk/build-tools/28.0.3/package.xml. Probably the
SDK is read-only
Exception while marshalling /opt/android-sdk/platform-tools/package.xml. Probably the
SDK is read-only
Exception while marshalling /opt/android-sdk/tools/package.xml. Probably the SDK is read-
only
Checking the license for package Android SDK Platform 28 in /opt/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: /opt/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:
BUILD FAILED in 1s
at checkExecSyncError (child_process.js:639:11)
at execFileSync (child_process.js:657:15)
at runOnAllDevices (/home/bruno/AwesomeProject/node_modules/@react-native-
community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/home/bruno/AwesomeProject/node_modules/@react-native-
community/cli-platform-android/build/commands/runAndroid/index.js:137:41)
at then.result (/home/bruno/AwesomeProject/node_modules/@react-native-community/cli-
platform-android/build/commands/runAndroid/index.js:103:12)
at processTicksAndRejections (internal/process/task_queues.js:86:5)