Missing ant and “code 8” errors when building multi-device hybrid application project


I have installed Multi Device Hybrid apps and when I'm building and debugging new project it showing these three errors

Error 1 executing command 'ant', make sure you have ant installed and added to your path. Error 2 C:\Users\User\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Command failed with exit code 8 Error 3 The command ""C:\Users\User\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" prepare --platform iOS --configuration Debug --projectDir . --projectName "BlankCordovaApp2" --language "en-US"" exited with code 8.

But I have set all the paths and adt_home in environment variables and still it is showing this error what to do


Try the following to check and enable all required Environment Variables for Multi-Device Hybrid App.

<strong>Step 1:</strong>

Go to Visual Studio -> Debug Menu -> Multi-Device Hybrid Apps -> Environment Variables Settings

<strong>Step 2:</strong>

Select Required Environment Variable from here as mentioned in the attached screenshot

<img alt="Environment Variable Settings" class="b-lazy" data-src="https://i.stack.imgur.com/w8Lxk.png" data-original="https://i.stack.imgur.com/w8Lxk.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />


Make sure ANT_HOME path is set to correct location like %systemdrive%\apache-ant-1.9.3 and make sure ANT is installed at location ANT_HOME is pointing. Also make sure system path is set to %ANT_HOME%\bin. You can download ANT from <a href="http://go.microsoft.com/fwlink/?LinkID=396869" rel="nofollow">here</a> in case it is not already installed.


I found the solution to “code 8” errors when building multi-device hybrid application project. The error message you get is: Error 2 \bld\Debug\platforms\android\cordova\build.bat: Command failed with exit code 8 \MDAVSCLI 1 1

This happens if you play around with the config.xml in DevStudio GUI (not textually edit the file). If you change the LaunchMode property and change it back to default value which is "singleTop", a new entry will be added to config.xml: <'preference name="AndroidLaunchMode" value="singletop" />

Just delete the entry, and your project compiles fine again. Quite a nasty bug in DevStudio


  • Autoconversion in javascript: Isn't it supposed to convert a string to a number when done like
  • How to auto zoom page for mobile
  • The 'OraOLEDB.Oracle' provider is not registered on the local machine, when working with a
  • How to chain calls to ng2-Translate, and rxjs observables in general?
  • How to insert List into database
  • Android Volley - Post Request - Not Working Online
  • Displaying UTF-16 characters on web browser
  • Unable to use Mapbox “Create an Upload” api to upload data file
  • content of the package declaration
  • Attribute target=“_newtab” for links
  • Sort the listbox items in C#
  • phantomjs not closing and leaving orphan processes
  • Navigate to a component without changing url in ReactJS
  • How do I efficiently find the number of digits within a range in which the digits within the number
  • How can I run my ionic app on a physical device (Wiko phone) on Windows?
  • gitlab throwing - failed to store ssl session
  • Why doesn't JPA's FetchType.LAZY work?
  • How to delete yarn logs
  • three.js — fit a background image panorama
  • Starting a javascript prompt after a button is clicked
  • AngularJS TypeError: Converting circular structure to JSON at Object.stringify (native)
  • Lambda Expression for Many to Many realtionship in C# EF 5 Code First
  • Java: search words in two dimensional array
  • Random number of FORM fields being prepared for database
  • Adding custom message on Thank You page by shipping method
  • no endpoints available for service \\“kubernetes-dashboard\\”
  • Creating and managing two independent random number sequences
  • How to set http status code when responding to servlet client from Filter class-method in tomcat
  • Eric5: The OK button of 'new project' dialog is disable
  • Greedy Algorithm in “C”
  • Extract table from Powerpoint
  • How can I do case insensitive string search with Linq and SQL Server?
  • Example of using Service Exists MSBuild task in Microsoft.Sdc.Tasks?
  • Unity Resources.load() won't work with external dll
  • Shiny - change the size (padding?) of dropdown menu (select tags) smaller
  • using maven pom while creating jar:test-jar some times it says JAR will be empty - no content was ma
  • Why isn't stemDocument stemming?
  • How to handle div that is created dynamically in a table
  • Running R's aov() mixed effects model from Python using rpy2