我有一个完全基于Cordova 3.4构建的Android Cordova应用。我只是更新到Cordova 3.5.0,构建失败,显示以下错误:
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...
[aapt] D:\Proyectos\Trialtea\Proyecto 31 - Aplicaciones HTML5\05. Aplicaciones Google Play\phonegap_projects\InglesEn100DiasTurbo\platforms\andro
id\ant-build\AndroidManifest.xml:2: error: Error: Float types not allowed (at 'versionCode' with value 'NaN').
BUILD FAILED
D:\Recursos\Android_Development\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml:653: The following error occurred while executing this line
:
D:\Recursos\Android_Development\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml:698: null returned: 1
Total time: 5 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\Proyectos\Trialtea\Proyecto 31 - Aplicaciones HTML5\05. Aplicaciones Google Play\phoneg
ap_projects\InglesEn100DiasTurbo\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: cmd: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\Albert\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
在第15行上有一个关于错误的错误:不允许的浮点类型(在'versionCode'上值为'NaN',我不知道为什么会发生。我在项目的根目录中有config.xml文件,版本代码设置为3,但由于某种原因,当我构建项目时,将AndroidManifest.xml设置为versionCode =“ NaN”。
最后显示的错误我不知道它是什么意思,或者是否与上面的错误有关。
谁能帮我解决这个问题?
哦,通过npm更新Cordova之后,我还使用cordova platform update android更新了项目文件夹中的Android平台。
我已经解决了更改www / config.xml中的“ version”属性的问题(即使它看起来不相关,因为问题与versionCode有关)。
只需添加第三个次要版本号,例如我从0.6更改为0.6.3
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句