【发布时间】:2020-02-03 04:34:48
【问题描述】:
我第一次进入 react native 世界,我正在尝试按照this article 从头开始设置 Windows 开发环境。在我尝试运行react-native run-android 之前一切正常。我已经接受了sdkmanager --licenses 的所有许可证,但我仍然收到许可证错误:
> Configure project :app
Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android SDK Build-Tools 27.0.3 not accepted.
Checking the license for package Android SDK Platform 27 in C:\Program Files\Android\Android Studio\licenses
Warning: License for package Android SDK Platform 27 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-27 Android SDK Platform 27
build-tools;27.0.3 Android SDK Build-Tools 27.0.3
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
然后我找到了this comment,其中用户建议使用以下命令:$ANDROID_HOME/tools/bin/sdkmanager "build-tools;26.0.1" "platforms;android-26"。我以sdkmanager.bat "platforms;android-27" "build-tools;27.0.3" 执行它以匹配我环境中的版本,并且经理确实下载了新许可证,但错误仍然存在。
我不知道如何接受上述许可。有什么建议吗?
【问题讨论】:
标签: android node.js react-native android-studio build