Reputation: 11
I want to develop Multi Device Hybrid Apps with Visual Studio 2013. My problem (I despair of it since hours):
When I create a BlankCordovaApp project, I can run this app with the Ripple Emulator of Visual Studio. This works.
But when I try to run it with the Android Emulator, I get the following error:
BUILD FAILED
1> C:\Users\Sabi\AppData\Local\Android\android-sdk\tools\ant\build.xml:932: The following error occurred while executing this line:
1> C:\Users\Sabi\AppData\Local\Android\android-sdk\tools\ant\build.xml:950: null returned: -1073741819
1>
1> Total time: 5 seconds
1> Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Sabi\Desktop\Development\Learning\Learning\bld\Debug\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
1> Command finished with error code 2: C:\Users\Sabi\Desktop\Development\Learning\Learning\bld\Debug\platforms\android\cordova\build.bat --debug,
1>
1> C:\Users\Sabi\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:126
1> throw e;
1> ^
1>EXEC : error : C:\Users\Sabi\Desktop\Development\Learning\Learning\bld\Debug\platforms\android\cordova\build.bat: Command failed with exit code 2
1> at ChildProcess.whenDone (C:\Users\Sabi\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
1> at ChildProcess.EventEmitter.emit (events.js:98:17)
1> at maybeClose (child_process.js:753:16)
1> at Process.ChildProcess._handle.onexit (child_process.js:820:5)
1>C:\Users\Sabi\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets(99,5): error MSB3073: Der Befehl ""C:\Users\Sabi\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" build --platform "Android" --configuration "Debug" --projectDir . --projectName "Learning" --language "de-DE" --buildServerUrl "" --buildTarget "AndroidEmulator"" wurde mit dem Code 8 beendet. (exit with code 8)
I found many answers which are about checking the environment path variables or something. I've also checked the environment variables in Tools - Options - Multi-Device Hybrid Apps - Environment Variable Overrides. But they are right!
When I try to build a cordova app without Visual Studio, it works and the app runs on my Android Emulator.
But this works only, when I create a new project with:
$ cordova create hello com.example.hello "Hello World"
$ cd hello
$ cordova platform add android
$ cordova build
If I want to build the Visual Studio project with "$ cordova build", I receive the same error like in Visual Studio.
Thanks, Sabi
Upvotes: 1
Views: 742
Reputation: 11
I had the same problem and battled for days before I worked it out. Basically the CTP install does not install all the files because Windows Defender blocks them (which files, I don't care.)
Hope this helps
JohnJollyStupid
Upvotes: 1