gpt4 book ai didi

android - 执行 ant 调试命令时无法成功构建 cordova 项目错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:36:12 27 4
gpt4 key购买 nike

我有一个错误,即相机在第一次尝试(点击)时未成功调用,所以我在 stackoverflow 上尝试了这个解决方案 Phonegap(3.0.0) Camera not successful on first try .我按照通过 cordova platform remove android 删除 android 的答案中提到的步骤进行操作,然后我运行第二个命令 cordova platform add android ;

现在,当我使用 netbeans 在 cordova android 设备上运行 cordova 应用程序时,出现此错误:

  exec: ant debug -f "/var/www/mobile/platforms/android/build.xml"

[ 'ant debug -f "/var/www/mobile/platforms/android/build.xml"',
{ [Error: Command failed:
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 8 seconds
] killed: false, code: 1, signal: null },
'Buildfile: /var/www/mobile/platforms/android/build.xml\n\n-set-mode-check:\n\n-set-debug-files:\n\n-check-env:\n [checkenv] Android SDK Tools Revision 22.3.0\n [checkenv]
.

.

.**LONG TEXT which I removed from the post **

.

\nBUILD FAILED\n/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720:

The following error occurred while executing this line:\n/var/www/adt-bundle-linux-x86_64- 20130917/sdk/tools/ant/build.xml:734:
Compile failed; see the compiler error output for details.\n\nTotal time: 8 seconds\n' ]

Error executing "ant debug -f "/var/www/mobile/platforms/android/build.xml"":
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 8 seconds


child_process.spawn(/var/www/mobile/platforms/android/cordova/build,[]) = 2

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
Error: An error occurred while building the android project.Error executing "ant debug -f "/var/www/mobile/platforms/android/build.xml"":
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 8 seconds


at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
/var/www/mobile/nbproject/build.xml:256: exec returned: 8
BUILD FAILED (total time: 4 minutes 36 seconds)

对这个问题有什么想法吗?

最佳答案

我遇到了类似的问题。我从一个单独的终端运行 ant debug -f "/path/to/project/build.xml" 。它显示了更具体的错误描述(对我来说是项目名称中有一个空格)。 This answer还注意到:

config.xml can't have a widget id with number as a first character after a dot. For example: com.42myapp.test or com.myapp.42test won't work as well as 42com.myapp.test. It will trigger an error from the compiler.

关于android - 执行 ant 调试命令时无法成功构建 cordova 项目错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21484395/

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