android - 在React Native项目运行期间停止下载Gradle

标签 android reactjs react-native gradle

我正在从事react native android project.I begginer已经启动了我的第一个android react native项目。当我运行我的应用程序时,它在cmd terminal中向我显示了此错误。我该如何解决?

Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
File C:\Users\hasee\.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 23.0.1 in C:\Users\hasee\AppData\Local\Android\Sdk\licenses
Warning: License for package Android SDK Build-Tools 23.0.1 not accepted.
Checking the license for package Android SDK Platform 23 in C:\Users\hasee\AppData\Local\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, Android SDK Build-Tools 23.0.1].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation 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: 6.997 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

最佳答案

~/Library/Android/sdk/tools/bin中运行:./sdkmanager --licenses
检查以下答案You have not accepted the license agreements of the following SDK components

关于android - 在React Native项目运行期间停止下载Gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49953853/

相关文章:

android - 为什么 Android Geocoder 会抛出 "Service not Available"异常?

android - 适用于 iOS 和 Android 的 FCM 远程通知负载

javascript - 将 "this"绑定(bind)到对象中定义的函数

javascript - 设置部署路由

css - 在 Gatsby 中使用 ActiveClassName 和 CSS 模块向事件链接添加样式不起作用

javascript - react native : Why doesn't <TextInput/> center with flexbox?

android - 有没有办法在 rx-java/kotlin 中对 groupBy 键进行排序?

java - 无法解析符号 R

android - 如何在 React Native 中制作图像编辑器?

javascript - React Native 签名的 apk 崩溃了