Cordova构建错误 - Android

时间:2015-03-25 06:34:05

标签: android cordova

我正在尝试构建我的Android应用程序。每次都会发生以下错误。

BUILD FAILED
C:\Users\INTEL\android-sdks\tools\ant\build.xml:653: The following error occurre
d while executing this line:
C:\Users\INTEL\android-sdks\tools\ant\build.xml:698: null returned: 1

Total time: 5 seconds

C:\SocialNoiseApp\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "ant debug -f C:\SocialNoiseApp\p
latforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR building one of the platforms: Error: C:\SocialNoiseApp\platforms\android\
cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: C:\SocialNoiseApp\platforms\android\cordova\build.bat: Command failed wit
h exit code 1
    at ChildProcess.whenDone (C:\Users\INTEL\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

我的环境变量有以下路径:

C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\nodejs\;C:\Program Files\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\node_modules\npm\bin;C:\Program Files (x86)\Skype\Phone\;C:\ant\bin;%ANDROID_HOME%/tools;%ANDROID_HOME%/tools;%ANDROID_HOME%/platform-tools

1 个答案:

答案 0 :(得分:0)

使用eclipse或ant清理你的android项目 然后建立你的cordova项目。希望这对你有用..