gpt4 book ai didi

java - 创建 android 项目时出错 Ionic 平台 android

转载 作者:行者123 更新时间:2023-11-30 02:37:11 25 4
gpt4 key购买 nike

我正在尝试使用 cordova 和 ionic 框架构建 android 应用程序,但是每当我尝试选择平台时,我都会收到以下错误消息,我还为 android、ant 和 java 设置了环境变量

$ cordova platform add android
Creating android project...

C:\Users\Darpan\node_modules\q\q.js:126
throw e;
^
Error: Failed to run "android". Make sure you have the latest Android SDK instal
led, and that the "android" command (inside the tools/ folder) is added to your
PATH.

at C:\Users\Darpan\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\
lib\check_reqs.js:43:27
at ChildProcess.exithandler (child_process.js:652:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Socket.<anonymous> (child_process.js:969:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
Error: C:\Users\Darpan\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\
create.bat: Command failed with exit code 8
at ChildProcess.whenDone (c:\Users\Darpan\AppData\Roaming\npm\node_modules\c
ordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

我不明白这是什么问题。

最佳答案

I also set the environment variables for android

也许尝试运行“which android”以确保您已正确设置路径? android 可执行文件位于 pathToSDK/sdk/tools 中。

可能还值得通过运行 Android SDK 管理器来验证工具是否已安装。

关于java - 创建 android 项目时出错 Ionic 平台 android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26317334/

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