【问题标题】:React Native Android SDK packages as some licences have not been accepted (Windows) [duplicate]React Native Android SDK 包,因为某些许可证尚未被接受(Windows)[重复]
【发布时间】:2021-11-04 01:53:44
【问题描述】:

我通过npx react-native init AwesomeProject 创建了一个新项目,并尝试通过npx react-native run-android 开始运行该项目
发生错误

error Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses".
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception. 

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     patcher;v4 SDK Patch Applier v4
     emulator Android Emulator
     platforms;android-30 Android SDK Platform 30
     build-tools;30.0.2 Android SDK Build-Tools 30.0.2
     tools Android SDK Tools
  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: C:\Users\user\AppData\Local\Android\Sdk\platform-tools

我应该如何解决这个许可问题?

【问题讨论】:

    标签: android react-native


    【解决方案1】:

    要解决此问题,您需要接受所有必需的 Android SDK 许可证。只需执行以下命令之一。

    窗户:

    cmd.exe /C"%ANDROID_HOME%\tools\bin\sdkmanager.bat --licenses"

    macOS

    是的 | $ANDROID_HOME/tools/bin/sdkmanager --licenses

    【讨论】:

      猜你喜欢
      • 2020-07-27
      • 1970-01-01
      • 2019-06-13
      • 1970-01-01
      • 1970-01-01
      • 2020-03-08
      • 1970-01-01
      相关资源
      最近更新 更多