gpt4 book ai didi

android - cordova 无法生成 apk,说配置项目 ':CordovaLib' 时发生了一些事情

转载 作者:太空狗 更新时间:2023-10-29 13:49:30 24 4
gpt4 key购买 nike

我是 ionic 的初学者 .. 并且正在尝试从 ionic 项目生成 apk .. 但不幸的是它未能生成。出现此错误

 Android Studio project detected

ANDROID_HOME=C:\Users\abdel ysf\AppData\Local\Android\sdkJAVA_HOME=C:\Program Files\java\jdk1.8.0_151工作室子项目路径:CordovaLib子项目路径:apppublishNonDefault 已弃用,不再有效。现在已发布所有变体。[18:51:59] lint 在 15.14 秒内完成检查 C:\Users\abdel ysf\AppData\Local\Android\sdk\licenses 中包 Android SDK Platform 26 的许可证警告:不接受 Android SDK Platform 26 包的许可。

失败:构建失败,出现异常。

  • 出了什么问题:配置项目“:CordovaLib”时出现问题。

    You have not accepted the license agreements of the following SDK components: [Android SDK Platform 26]. 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 选项运行以获得更多日志输出。

  • https://help.gradle.org 获得更多帮助

在 7 秒内构建失败(节点:23120)UnhandledPromiseRejectionWarning:错误:cmd:命令失败,退出代码为 1 错误输出:失败:构建失败,出现异常。

  • 出了什么问题:配置项目“:CordovaLib”时出现问题。

    You have not accepted the license agreements of the following SDK components: [Android SDK Platform 26]. 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 选项运行以获得更多日志输出。

  • https://help.gradle.org 获得更多帮助

在 7 秒内构建失败 在 ChildProcess.whenDone(C:\Users\abdel ysf\Desktop\ionic\HelloWorld\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) 在 emitTwo (events.js:126:13) 在 ChildProcess.emit(events.js:214:7) 在 maybeClose (internal/child_process.js:925:16) 在 Process.ChildProcess._handle.onexit(内部/child_process.js:209:5)(节点:23120)UnhandledPromiseRejectionWarning:未处理的 promise 拒绝。这个错误要么是在没有 catch block 的情况下在异步函数内部抛出,要么是因为拒绝了一个没有用 .catch() 处理的 promise 。 (拒绝编号:1)(节点:23120)[DEP0018] DeprecationWarning:未处理的 promise 拒绝已弃用。将来,未处理的 promise 拒绝将以非零退出代码终止 Node.js 进程。

我使用的命令是: ionic Cordova 构建安卓

最佳答案

打开 Android Studio SDK 管理器并在“SDK 平台”选项卡下,选择所需的 Android 版本(例如:Android 8.1(Oreo))并单击确定。如果错误不断重复,请尝试安装一些以前的 Android 版本。

关于android - cordova 无法生成 apk,说配置项目 ':CordovaLib' 时发生了一些事情,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49884979/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com