Cordova build error after update to 3.5.0

android, cordova, cordova-3

Solution

I have solved this changing the "version" attribute in www/config.xml (even if it seems unrelated because the problem is with versionCode).

Just add a third minor version number, for instance I changed from 0.6 to 0.6.3

Problem

I have an Android Cordova app that built perfectly on Cordova 3.4. I just update to Cordova 3.5.0 and the build fails, showing these errors: ``` -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) ``` There's an error on line 15 about Error: Float types not allowed (at 'versionCode' with value 'NaN', which I don't know why it happens. I have in my project's root the config.xml file with version code set to 3, but for some reason, when I build the project, the AndroidManifest.xml is set with versionCode="NaN". The error shown at the end I have no idea what it means or if it's related to the error above. Could anyone help me figure this out? Oh, after updating Cordova via npm I also updated the Android platform in the projects folder using cordova platform update android.

Original source