One, the Windows environment configuration
1. If VS2015 is already installed, open tools-options to find the Cordova option:
Runs the dependency viewer, which is used to detect the integrity of the development environment.
If the detection shows:
Then the environment configuration is complete. can be developed directly.
If the error page is displayed, follow the instructions on the error page to configure the appropriate environment.
The generic error page hints are missing corresponding dependent components, including the following:
Git
node. js
Android SDK
Jdk
These components can be installed when installing VS, but the version is not up to date. So it is common to manually install the line.
Before this article was released: VS2015 Cordova The current version is update 8. I am using Update7,cordova version 5.1.1, which supports Android-23.
Note: node. JS is best to install the x86 32-bit version. VS Official advice is recommended to use the 32-bit version, if you install 64 for node. js then the dependency check may prompt the system to not install node. js. If you are always prompted not to install node, it is recommended to change to 32-bit. After testing, some of the machine installed 64 normal, some machines installed 64 will be prompted to find node, according to the official comments to 32 bit is normal.
2. If there is no Cordova option in VS, see the following steps:
There is no Cordova option in tools-options, so the default installation option is used when installing VS, and the Cordova tool is not installed in the default installation options. Re-open the VS2015 installation package, execute the installer, select Modify, will pop up all the installable list, the Cordova option is ticked, re-apply it. It is recommended to install the Android SDK before the installation, vs install the Android SDK by default with Google address, no VPN, it will wait for a long time.
Open the VS Installer and select Modify:
Tick Corvoda:
Note: Tick Cordova will also automatically default to the Android SDK and Git tool options, do not display the Android SKD option, because the test computer is not connected, remember the installation process to ensure that the network unobstructed.
3. If the newly installed VS
It is recommended to use VS2015 Update1 and above. When installing, select Custom, check the required options, and recommend installing the Android SDK before installing. The installation steps are as shown, while ensuring that the network is unobstructed.
Second, the MAC environment configuration
1. You have a Mac computer
Download and install the Xcode tool, which provides the compilation and emulator.
Download install node. js
Use the node command to download and install tools such as Remotebuild
Remember to unlock the root account before use
Su Root
sudo npm install npm-g
sudo npm install remotebuild-g
sudo npm install ios-sim-g
After the installation completes the Remotebuild tool, start the Remotebuild service:
Remotebuild-secure false
Note:-secure false enable non-secure mode, use a secure link when testing on my machine, unable to link successfully, we recommend using non-secure link, the startup result is as follows:
A PIN code will be generated on the first boot, remember to be sure to write it down and need to be configured in VS if no pin code is used:
Remotebuild-test
or use
Remotebuild-certificates
To generate. The default first boot will produce the corresponding information as follows:
Ip:192.168.1.101
pin:214021
port:3000
The pin value above is the default generated PIN code, if there is forgotten, seemingly can use, if there is no IP information, you see the next IP in the Mac.
To complete the above steps, open VS2015 tools-options to find the Cordova option and select "iOS Configuration":
Fill in the information obtained above, note: Recommended Safe Mode Select False to turn off. SSL Secure Link I tried it briefly, it seems not good, or turn it off.
Now that the IOS environment is fully configured, just turn on the Mac and Remotebuild Remote compilation service and keep your network open.
Xcode's simulation will automatically open after vs makes a compile request.
2. No Mac computer
Use a Microsoft account to request a free Mac cloud virtual machine, or build your own Mac virtual machine, the environment is configured as above.
Conclusion: The Hello Word program will be described in detail in the next section, including compile generation, simulator, real machine debugging and so on. This article only describes the environment configuration. If you like, please pay attention, follow-up will continue to launch.
VS2015 Cordova Ionic Mobile Development (i)