ionic cordova build构建失败并出现异常



我是一个初学者,在Ionic的麻烦。我想做一个安卓应用程序使用Cordova为我的家庭作业。我尝试切换到Android Studio,卸载-重新安装Gradle,运行带有——verbose标志的命令,但没有任何效果。当我输入"ionic cordova build android"时;我得到了这个错误:

**FAILURE: Build failed with an exception.**
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     platforms;android-29 Android SDK Platform 29
  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:UsersHpAppDataLocalAndroidsdk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
**BU¦LD FAILED in 1s**
Command failed with exit code 1: C:UsersHphavaplatformsandroidgradlew cdvBuildDebug -b C:UsersHphavaplatformsandroidbuild.gradle
[ERROR] An error occurred while running subprocess cordova.
        cordova.cmd build android exited with exit code 1.

安装sdk和avd了吗?

这个链接有一个很好的浏览

可能是你使用了错误的java版本.....也许你没有设置ENV路径.....可能(很可能是基于错误)您没有下载API级别并接受许可协议,这也意味着您没有安装AVD。

那本指南会让你明白的。

最新更新