失败:构建失败,出现异常。
出了什么问题: 配置项目“: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
尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出
遇到这种情况怎么办?
最佳答案
如果在 Android Studio 中打开 SDK Manager:
打开 Android SDK 管理器。
单击“SDK 工具”选项卡并选中屏幕右下角的“显示包详细信息”复选框。
勾选“Android SDK Build-Tools”下的 23.0.1 选项。
点击“应用”。系统应该会提示您提供许可协议(protocol)。接受许可,您就完成了。
尝试重新运行您的 react-native 应用。
如果不使用 Android Studio:
在您的 Android SDK 文件夹(可能在 tools 或 platform-tools 文件夹中)打开 SDK Manager
选中版本号为 23.0.1 的“Android SDK 构建工具”旁边的复选框。
点击“安装 1 个包”(它可能是不同的数字。如果您不想安装/更新任何其他东西,请取消选中其他框)
您应该会在某个时候看到一份许可协议(protocol)。接受它并让 SDK 管理器为您安装这些东西。
尝试重新运行您的 react-native 应用。
关于android - 由于未接受许可协议(protocol),run-android 无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44099985/