Search code examples
androidcordovavisual-studio-2015visual-studio-cordova

Visual Studio Enterprise 2015 RC Cordova Android Build Exit Code 1


I am using Visual Studio Enterprise 2015 RC to develop a Cordova app. The app was working fine and being tested on my Samsung Galaxy S6 device fine for about two days. One day, after a lunch break, I came back to my app and started receiving an error when I tried to deploy to either an emulator or a device that read

cmd: Command failed with exit code 1

After about two days of researching this issue, I have yet to find a fix. I cannot test my app except in the "Ripple" environment, which is not useful for testing this app.

Here is the relevant output:

1>  -code-gen:
1>  [mergemanifest] Found Deleted Target File
1>  [mergemanifest] Merging AndroidManifest files into one.
1>  [mergemanifest] Manifest merger disabled. Using project manifest only.
1>       [echo] Handling aidl files...
1>       [aidl] No AIDL files to compile.
1>       [echo] ----------
1>       [echo] Handling RenderScript files...
1>       [echo] ----------
1>       [echo] Handling Resources...
1>       [aapt] Generating resource IDs...
1>       [aapt] D:\Stack Solutions\StackTFSSolutions\NRCA Phone App\AppRoot\platforms\android\ant-build\AndroidManifest.xml:6: error: Error: String types not allowed (at 'screenOrientation' with value 'Portrait').
1>       [aapt]
1>  Command finished with error code 1: cmd /s /c ""D:\Stack Solutions\StackTFSSolutions\NRCA Phone App\AppRoot\platforms\android\cordova\build.bat" --debug --ant "
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

Solution

  • Spent 3 hours on this one after migrating to vs 2015 from 2013.

    The solution came when I changed Tools>>Options>>Projects and Solutions>>Build and Run (build output and build log) verbosity to Diagnostic. Which gave me more information as to why it was not building.

    I discovered in my case a cordova-plugin-file transfer was causing it, so I uninstalled it and reinstalled it and viola it works!