No ant and "code 8" errors when creating a hybrid application project with multiple devices

I installed hybrid applications for several devices, and when I create and debug a new project, it shows 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 set all the paths and adt_home in the environment variables, and yet it shows this error, what to do

+2
source share
3 answers

Try the following to check and enable all required Environment Variablesfor a hybrid application with multiple devices.

Step 1:

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

Step 2:

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

Environment Variable Settings

+2
source

, ANT_HOME , %systemdrive%\apache-ant-1.9.3, , ANT , ANT_HOME. , %ANT_HOME%\bin. ANT , .

0

"code 8" . , : 2\bld\Debug\platform\android\cordova\build.bat: 8\MDAVSCLI 1 1

This happens if you are playing with config.xml in the DevStudio GUI (not text editing the file). If you change the LaunchMode property and change it to the 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 will compile again. Pretty nasty bug in DevStudio

-1
source

Source: https://habr.com/ru/post/1540937/


All Articles