简体   繁体   English

建立Cordova项目时出错

[英]Error while building cordova project

i have a working android project whose www is provided by my freind. 我有一个工作的android项目,其www由我的朋友提供。 And I created cordova project and added android platform for the same. 我创建了cordova项目并为其添加了android平台。 Then replaced the www folder with the project www. 然后将www文件夹替换为项目www。 When i build the cordova project it shows this error. 当我构建cordova项目时,它会显示此错误。

BUILD FAILED
C:\Android\adt-bundle\sdk\tools\ant\build.xml:932: The following error occurred
while executing this line:
C:\Android\adt-bundle\sdk\tools\ant\build.xml:950: null returned: -1073741819

Total time: 11 seconds

C:\Android\fresh\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:\Android\fresh\pla
tforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Android\fresh\platforms\android\cordova\build.bat: Command failed with
 exit code 8
    at ChildProcess.whenDone (C:\Users\riyas\AppData\Roaming\npm\node_modules\co
rdova\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)

Finally i have solved this issue, ie the error -1073741819 . 终于我解决了这个问题,即错误-1073741819。 this is due to bug in aapt.exe file build-tools in sdk for windows users. 这是由于Windows用户在sdk中的aapt.exe文件构建工具中存在错误。

Replace the aapt.exe file with this file https://android.googlecode.com/issues/attachment?aid=776290120000&name=aapt.exe.zip&token=ABZ6GAcRj6lR-sOmUyVguB0Gmf_BI4Z7Gg%3A1415016896298 将此文件替换为aapt.exe文件https://android.googlecode.com/issues/attachment?aid=776290120000&name=aapt.exe.zip&token=ABZ6GAcRj6lR-sOmUyVguB0Gmf_BI4Z7Gg%3A1415016896298

for more information, Check this page 有关更多信息,请检查此页面

https://code.google.com/p/android/issues/detail?id=77629 https://code.google.com/p/android/issues/detail?id=77629

just upgrade your android sdk to a stable version.. i was using 21, but upgraded to 21.02. 只需将您的android sdk升级到稳定版本即可。我使用的是21,但已升级到21.02。 then i rebuilt it and it worked. 然后我对其进行了重建,并且效果良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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