I have set all the required environments. To confirm i checked the requirements to build android using command
cordova requirements
which gave the result as below
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,Google
Inc.:Google APIs:24,android-23
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle
when i tried to build apk using command
ionic cordova build android
am getting as below
> ionic cordova prepare
> cordova prepare
- Running command [12:17:44] lint finished in 4.70 s
√ Running command - done!
> cordova build android
× Running command - failed!
[ERROR] An error occurred while running cordova build android (exit code 1):
ANDROID_HOME=C:\Users\Arunkumar.DESKTOP-59TSCLF\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
The system cannot find the path specified.
Error: cmd: Command failed with exit code 1
Previously I had also faced this problem. I solved my problem by this way. I have installed Gradle in C:\Program Files\gradle\gradle-3.3. I set the Gradle path like that
GRADLE_HOME C:\Program Files\gradle\gradle-3.3
Add Path C:\Program Files\gradle\gradle-3.3\bin
Related
I am trying to add an Android platform for my ionic 2 projects using "ionic cordova platform add android". But it gives "[ERROR] An error occurred while running subprocess cordova." Any solution?
I would try to reinstalling cordova.
npm uninstall -g cordova
npm install -g cordova
I hope this help
Trying to install aws plugin for vagrant. Getting a dependency error.
Logs show...
find_executable: checking for xml2-config... -------------------- no
--------------------
"pkg-config --exists libxml2"
package configuration for libxml2 is not found
Console output:
C:\Users\jkittell\Documents\Schedule3> vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
ERROR: Failed to build gem native extension.
current directory: C:/Users/jkittell/.vagrant.d/gems/2.4.4/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
C:/HashiCorp/Vagrant/embedded/mingw64/bin/ruby.exe -r ./siteconf20181002-19764-xj4q7a.rb extconf.rb
checking for xml2-config... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/HashiCorp/Vagrant/embedded/mingw64/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Users/jkittell/.vagrant.d/gems/2.4.4/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Users/jkittell/.vagrant.d/gems/2.4.4/gems/ovirt-engine-sdk-4.2.4 for inspection.
Results logged to C:/Users/jkittell/.vagrant.d/gems/2.4.4/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/gem_make.out
PS C:\Users\jkittell\Documents\Schedule3>
I did a google search and found a hotfix for this.
Gem file available here.
Just do a vagrant plugin install ~/PATH/TO/vagrant-aws-0.8.0.gem
I had to install fog-aws plugin first and then it worked.
vagrant plugin install fog-aws
Console output:
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install ..\..\Downloads\vagrant-aws-0.8.0.gem
Installing the '..\..\Downloads\vagrant-aws-0.8.0.gem' plugin. This can take a few minutes...
Fetching: iniparse-1.4.4.gem (100%)
Fetching: fog-core-2.1.2.gem (100%)
Fetching: fog-aws-3.3.0.gem (100%)
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies fog-aws (= 2.0.1) and fog-aws (~> 3.0)
Activated fog-aws-3.3.0
which does not match conflicting dependency (= 2.0.1)
Conflicting dependency chains:
vagrant-aws (= 0.8.0), 0.8.0 activated, depends on
fog-aws (~> 3.0), 3.3.0 activated
versus:
fog-aws (= 2.0.1)
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install fog-aws
Installing the 'fog-aws' plugin. This can take a few minutes...
Successfully uninstalled dry-inflector-0.1.2
Successfully uninstalled fog-aliyun-0.3.2
Successfully uninstalled fog-atmos-0.1.0
Successfully uninstalled fog-aws-2.0.1
Successfully uninstalled fog-brightbox-0.16.1
Successfully uninstalled fog-cloudatcost-0.1.2
Successfully uninstalled fog-core-1.45.0
Successfully uninstalled fog-digitalocean-0.4.0
Removing console
Removing setup
Successfully uninstalled fog-dnsimple-1.0.0
Successfully uninstalled fog-dynect-0.0.3
Successfully uninstalled fog-ecloud-0.3.0
Successfully uninstalled fog-google-0.1.0
Successfully uninstalled fog-internet-archive-0.0.1
Successfully uninstalled fog-joyent-0.0.1
Successfully uninstalled fog-local-0.6.0
Successfully uninstalled fog-openstack-0.3.6
Successfully uninstalled xml-simple-1.1.5
Installed the plugin 'fog-aws (3.3.0)'!
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install ..\..\Downloads\vagrant-aws-0.8.0.gem
Installing the '..\..\Downloads\vagrant-aws-0.8.0.gem' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.8.0)'!
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.8.0)'!
PS C:\Users\jkittell\Documents\Schedule3>
Try using:
vagrant plugin install fog-aws
vagrant plugin update
vagrant plugin install vagrant-aws
This should upgrade fog to a version 3.5 or greater
I am building a mobile app using VS-TACO and I am trying to run my build on iOS.
When I try to build this app for iOS on a Windows host which is connected to a Mac with remotebuild agent, then I get following Error Message in Visual Studio 2017 on Windows Machine
"Remote build error from the build server
https://macIpAddress:3000/cordova - Error: Failed to acquire Cordova
version 6.3.1. TACO0204: Error installing cordova via npm. Exit Code:
1. See output for details. EShopper"
When i do "npm cordova -v" on my Mac, i see "5.4.2"
Windows OS: Windows 10
Mac OS Sierra
I have given all required user permissions as suggested in taco.visualstudio
Making npm cordova -v equals npm -v. It returns the npm's version, not the cordova version.
Cordova has to be installed on your PC(WINDOWS).
Could you do on your PC: cordova -v?
If nothing is return : npm install -g cordova#6.3.1 or npm install -g cordova#latest if you want the LATEST version of cordova.
Then you have to tell Visual studio to use the global version of cordova, for that: choose Global Cordova option in Config.xml editor UI.
Tell me if it's better, otherwise i'll guide you.
I created a shared library with Visual Studio Enterprise 2015 Update 1 :
File > New Project > Templates > Visual C++ > Cross Platform > Shared Library (Android, iOS)
I got the following project structure by default :
The android project builds successfully. But the issue appears when I try to compile the iOS project (the highlighted one on the screenshot).
Since a build agent is needed, I installed it on a Mac using npm and vcremote (as explained here : https://msdn.microsoft.com/library/mt147405.aspx).
I successfully paired Visual Studio with the Mac by going into Tools > Options > Cross Platform > C++ > iOS > Pairing.
But I still get the following error :
"Build agent request has failed, this client is not compatible with the paired build agent. Client version "1.3.0", build agent version "2.3.0". Supported build agent versions are: "2.0.0 - 2.2.0". Please update vcremote with "npm update vcremote", on the Mac."
On the Mac Terminal I get a similar error message :
"Visual Studio is incompatible with the current version of this build agent. Please update vcremote using npm."
I did run the npm update vcremote command, it is now up to date, but the error still shows up. Moreover it seems that the build agent version is too high regarding the client version.
What do you guys suggest ?
The problem was the version of vcremote-lib which was too high (2.3.0). I tried to downgrade only this package but it didn't work, so I downgraded the entire vcremote and it finally worked. Here are the steps I followed to resolve my problem :
Uninstall vcremote :
(documentation about the npm "uninstall" command : https://docs.npmjs.com/cli/uninstall)
sudo npm -g uninstall vcremote --save
sudo npm -g uninstall vcremote-lib --save
Check which versions are available :
(documentation about the npm "version" command : https://docs.npmjs.com/cli/version)
If you don't specify a version number while installing a package the latest version is chosen by default. To check the available versions for a specific package (here we're talking about vcremote package) run the following command :
npm view vcremote versions
Reinstall a specific version of vcremote :
(documentation about the npm "install" command : https://docs.npmjs.com/cli/install)
I didn't want the last one (1.0.8), so I specified a prior version (1.0.6) while running the following command :
sudo npm install -g --unsafe-perm vcremote#1.0.6
...instead of using the following command provided in the documentation :
sudo npm install -g --unsafe-perm vcremote
And finally :
Now it's working fine because vcremote 1.0.6 uses vcremote-lib 2.0.0 (while vcremote 1.0.8 used vcremote-lib 2.3.0).
(i can't post comments yet...)
With visual studio 2015 update 2 released yesterday you get this error:
Build agent request has failed, this client is not compatible with the paired build agent. Client version "1.4.0", build agent version "2.0.0". Supported build agent versions are: "2.3.0 - 2.4.0". Please update vcremote with "npm update vcremote", on the Mac.
now need to update to vcremote 1.0.8 (in order to get vcremote-lib 2.0.3):
sudo npm install -g --unsafe-perm vcremote#1.0.8
which brought in vcremote-lib 2.0.3, version 2.0.4 doesn't seem to be available yet
I upgraded to beta.23 and started to get an error when created a new project using 'ionic start foo --v2 --verbose'.
The error in red says
"Unable to spawn commandError: spawn npm ENOENT (CLI v2.0.0-beta.23)."
I have npm installed and can run from Windows 8 cmd line.
I tried upgrade to node v5.9.1.
I confirmed npm is in the PATH environment variable and can run npm from cmd shell.
Any ideas how to fix or debug further would be appreciated.
Here is the complete output:
C:\ionic2>ionic start foo --v2 --verbose
Task setting: title=start, name=start, summary=Starts a new Ionic project in the
specified PATH, [options]=any flags for the command, <PATH>=directory for the n
ew project, [template]=Starter templates can either come from a named template,
(ex: tabs, sidemenu, blank),
a Github repo, a Codepen url, or a local directory.
Codepen url,
Defaults to Ionic "tabs" starter template, --appname|-a=Human readable name for
the app (Use quotes around the name), --id|-i=Package name for <widget id> confi
g, ex: com.mycompany.myapp, title=Skip npm package installation, boolean=true, t
itle=Create a basic structure without Cordova requirements, boolean=true, title=
Setup the project to use Sass CSS precompiling, boolean=true, title=List starter
templates available, boolean=true, --io-app-id=The Ionic.io app ID to use, --te
mplate|-t=Project starter template, boolean=true, title=Start a Ionic v2 project
, boolean=true, title=(with --v2 only) Use TypeScript in starter, --zip-file|-z=
URL to download zipfile for starter template, module=./ionic/start, disableChang
ePwd=true
Utils.preprocessCliOptions _=[start, foo], skip-npm=false, no-cordova=false, w=f
alse, sass=false, s=false, list=false, l=false, v2=true, v=false, typescript=fal
se, -ts=false, verbose=true, $0=C:\Program Files\nodejs\node.exe C:\Users\bradtk
e\AppData\Roaming\npm\node_modules\ionic\bin\ionic
One awesome Ionic app coming right up...
Creating Ionic app in folder C:\ionic2\foo based on tabs project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-
tabs/archive/master.zip
[=============================] 100% 0.0s
Installing npm packages...
Running exec command: npminstall
Utils.fail Unable to run spawn commandError: spawn npm ENOENT undefined
Utils.fail stack undefined
Utils.errorHandler is set, calling that now
Cli.Utils.errorHandler msg Unable to run spawn commandError: spawn npm ENOENT st
ring
Unable to run spawn commandError: spawn npm ENOENT (CLI v2.0.0-beta.23)
Your system information:
Cordova CLI: 6.1.0 (cordova-lib#undefined)
Ionic CLI Version: 2.0.0-beta.23
Ionic App Lib Version: 2.0.0-beta.13
OS: Windows 8.1
Node Version: v5.9.1
Regards,
bruce
I have the exact same issue. Worked in beta 22.
Reverting to the earlier beta resolved the issue:
npm install -g ionic#2.0.0-beta.22
Move into folder of your application and run npm install. I don't know what is happening but sound like start script trying to execute npminstall rather than npm install:
Installing npm packages...
Running exec command: npminstall
This is a known issue with the CLI on windows. Downgrading to cli beta22 can work as workaround for now, but this will be fixed in the next release
Upgrading npm worked for me.
npm install -g npm