Apache Cordova:生成失败错误代码1和Javascript异常
Apache Cordova: Build failed Error code 1 and Javascript Exception
我正在用Apache Cordova制作一个小的Android应用程序。一切都很好,直到构建开始崩溃。正如这里的另一个线程所建议的,我重新安装了我正在使用的Apache Cordova插件(媒体)。在MSDN上,有人找到了帮助,删除了C:''Users/MyName/.gradle并关闭了防火墙,所以java会再次下载一些东西。下载后出现故障:
......
:compileDebugRenderscript UP-TO-DATE
1> :generateDebugBuildConfig UP-TO-DATE
1> :generateDebugAssets UP-TO-DATE
1> :mergeDebugAssets FAILED
1>
1> FAILURE: Build failed with an exception.
1>
1> * What went wrong:
1> Execution failed for task ':mergeDebugAssets'.
1> > java.lang.NullPointerException (no error message)
1>
1> * Try:
1> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
1>
1> BUILD FAILED
1>
1> Total time: 3 mins 11.981 secs
1> Picked up _JAVA_OPTIONS: -Xmx512M
1>
1> C:'Users'Paul'Documents'Visual Studio 2015'Projects'LifePointCounter'LifePointCounter'platforms'android'cordova'node_modules'q'q.js:126
1> throw e;
1> ^
1> Error code 1 for command: cmd with args: /s /c ""C:'Users'Paul'Documents'Visual Studio 2015'Projects'LifePointCounter'LifePointCounter'platforms'android'gradlew" cdvBuildDebug -b "C:'Users'Paul'Documents'Visual Studio 2015'Projects'LifePointCounter'LifePointCounter'platforms'android'build.gradle" -Dorg.gradle.daemon=true"
1> Command finished with error code 1: cmd /s /c ""C:'Users'Paul'documents'visual studio 2015'Projects'LifePointCounter'LifePointCounter'platforms'android'cordova'build.bat" --debug "--buildConfig=C:'Users'Paul'documents'visual studio 2015'Projects'LifePointCounter'LifePointCounter'build.json""
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 1
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 1
在这个错误出现之前,我做的最后一件事是:
- 更改一些资源音频文件(之后播放这些文件会在运行时出错)
- 在我的设备上卸载我的应用程序(通过内部版本重新安装)
我不知道那里发生了什么,我对此也不太熟悉。
编辑:
另一个线程建议Node.js版本为0.10.36现在我得到了退出代码8,只有一个错误><
对我来说,解决方案是:
cordova clean
然后当我运行时:
cordova emulate android
一切都恢复了!
相关文章:
- 点击谷歌结果页面时,HtmlUnit中出现JavaScript异常
- 未捕获的运行时JavaScript异常(Rhino)
- JavaScript异常:“;不成形”;在firefox浏览器上;XMLHttpRequest"chrome浏
- 未处理的 JavaScript 异常终止 MSAppHost/WWAHost.exe
- Javascript 异常 “参数名称: 索引” 使用 jquery
- JavaScript 异常处理未按预期工作
- 带有Javascript异常的HtmlDriver
- 通过抛出setTimeout()来处理JavaScript异常的任何问题
- 定义自定义JavaScript异常的较短方法
- 如何在 Sencha Touch 2 中将所有 JavaScript 异常写入文本文件
- 使用 foreach 函数时的 JavaScript 异常
- 带有 JavaScript 异常的 ajax:意外的输入结束
- 如何在使用迷你程序时收集有用的JavaScript异常
- 在onError事件中捕获一个javascript异常(webkit语音识别)
- javascript异常对象格式
- JavaScript异常”;调用的对象已与其客户端断开连接"打开(..)
- 在挂毯中隐藏javascript异常
- 为什么Javascript异常会使解释器处于不可预测的状态
- JavaScript异常:What'这是交易
- 使用selenium检查javascript异常