【问题标题】:ionic cordova build android - build failed with an exceptionionic cordova build android - 构建失败并出现异常
【发布时间】:2021-01-13 18:12:36
【问题描述】:

我是一个初学者,在使用 Ionic 时遇到了麻烦。我想使用 Cordova 为我的家庭作业制作一个 android 应用程序。我尝试切换到 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:\Users\Hp\AppData\Local\Android\sdk

* 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:\Users\Hp\hava\platforms\android\gradlew cdvBuildDebug -b C:\Users\Hp\hava\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android exited with exit code 1.

【问题讨论】:

    标签: android cordova ionic-framework


    【解决方案1】:

    您是否安装了 SDK 和 AVD?

    此链接has an excellent walk thru

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

    该指南应该让你明白。

    【讨论】:

      猜你喜欢
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      • 2018-03-19
      • 2021-12-21
      • 2021-02-27
      • 2014-10-12
      • 2022-07-20
      • 1970-01-01
      相关资源
      最近更新 更多