在本机项目运行期间停止下载gradle

时间:2018-04-21 08:31:06

标签: android reactjs react-native gradle

我正在研究本机android项目。我已经启动了我的第一个android反应本机项目,因为我是begginer。当我运行我的应用时,它在我的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

1 个答案:

答案 0 :(得分:0)

~/Library/Android/sdk/tools/bin中运行:./sdkmanager --licenses

检查以下答案You have not accepted the license agreements of the following SDK components