【发布时间】: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