简体   繁体   中英

Cordova build error- Android

I was trying to build my android app. Following error occurs every time.

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)

My Environment variable have following path:

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

Clean your android project using eclipse or ant Then build your cordova project. Hope this will work for you..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM