The Windows 10-based Visual Studio 2015 cross-platform application development is based on the Visual Studio installation of Xamarin's expanded app development across Android, IOS, and Windows, based on Apache Cordova's Visual Studio Tools develop apps across Windows, Android, and IOS devices, create apps across Android and Windows based on Visual C + +, and Visual Studio Tools for Unity creates games across Android, IOS, and Windows platforms.
The main contents of this article series:
Installing Visual Studio and Visual Studio Tools for Apache Cordova in Windows 10
Create Cordova cross-platform apps
Cordova app with Microsoft Azure data interconnect
Visual Studio Emulator for Android
Packaging and publishing Cordova applications
What is Cordova?
Because these APIs are cross-platform, you can share most of the code you write between three platforms, reducing development and maintenance costs. Also, there is no need to start from scratch. If you have created other types of WEB applications, you can share these files with the Cordova app without modifying or re-designing in any way.
Install the development environment in Windows 10 to install Visual Studio 2015 and Visual Studio Tools for Apache Cordova
Visual Studio 2015 (currently available in Microsoft's RC version) is available for download at Https://www.visualstudio.com/downloads/visual-studio-2015-downloads-vs and you can select Community version (free) or Enterprise version (commercial version).
In Visual Studio 2013, the Cordova tool is installed as a separate extension and is already integrated in Visual Studio 2015, and it is recommended that you use Visual Studio 2015 Development of Cordova cross-platform applications.
- Run Visual Studio 2015 setup to ensure that the following features are installed:
- Windows 8.1 and Windows Phone 8.0/8.1 tools
Make sure that you allow the installer to install third-party software dependencies, or you can clear the software options and manually install the dependencies that you want to use later.
The installation program for Visual Studio 2015 includes third-party open source software that supports Cordova application development:
- Joyent node. JS enables Visual Studio to integrate with the Apache Cordova Command line Interface (CLI) and Apache Ripple emulator
- The Git CLI to use when adding git URIs manually for a specific Cordova plugin.
- Run the Apache Ripple emulator on IOS and Android using Google Chrome
- The Android build process requires an Apache Ant 1.8.0 or later version.
- The Android build process requires the use of 32-bit Oracle Java JDK 7. Note: 64-bit Java is not supported.
- Android build process and Ripple need to use the Android SDK.
- Apple itunes deploys the app to your iOS device.
- Install the tools for iOS
To use Visual Studio to create and run an iOS app on an iOS emulator or iOS device, you must install and configure Remote Agent vs-mda-remote on your MAC computer and configure the remote agent in Visual Studio on your PC. For the configuration of this section, readers should refer to Configure the Visual Studio Tools for Apache Cordova (https://msdn.microsoft.com/en-us/library/dn771551 (v= vs.140). aspx) in the iOS section.
If you are ready to run your app and execute code line by row, select an emulator (such as the Apache Ripple emulator or the Visual Studio Emulator for Android) or a device that is directly connected to your computer. Then, launch the app. If you are developing an application on a Windows PC, you can run it. All of these options are built into Visual Studio as part of the Visual Studio Tools for Apache Cordova extension.
Manually installing the Cordova dependency
Usually we choose not to install one or more dependencies with extensions , and install them manually later. or download failure when installing the Android SDK like the author. At this point, we all need the ability to manually install dependencies.
Please note that Java is installed by selecting the 32-bit installation package because 64-bit Java is not supported.
Use these links to manually install the dependencies.
Joyent node. js
Installing the x86 version of node. JS is recommended.
Git command-line tools
Choose the option to add git to your command prompt path when you install the GIT command-line tool.
Download Ant and unzip it to a location like c:/ant-1.x.x
Set the ANT_HOME environment variable to point to the previous position.
Add%ant_home%\bin to the system path.
32-bit Oracle Java 7
Set the JAVA_HOME environment variable to C:/Program files/java/jdk1.7.0_55
Add this item to the system path:%java_home%\bin
Android SDK with SDK package
Android SDK Tool (latest version)
Android SDK Platform Tool (latest version)
Android SDK Generation Tools (19.1, 19.0.3 and 21)
Android 4.4.x with the following package (API level 21):
ARM EABI v7a System image
Intel x86 Atom System image
Google API (x86 system image)
Google API (ARM system image)
The following illustration shows the minimum package required in the Android SDK Manager.
Set the ADT_HOME environment variable to the SDK installation location.
Add this item to the system path:%adt_home%\tools;%adt_home%\platform-tools
Apple ITunes (x86, x64)
Websocket4net (required when developing an app on Windows 7)
- Download websocket4net (0.9) from CodePlex. Binaries.zip.
- Copy Net45\release\websocket4net.dll from the downloaded zip file to%programfiles (x86)%\microsoft Visual Studio 12.0\common7\ide\ on your computer The Commonextensions\microsoft\webclient\diagnostics\toolwindows folder.
Resetting environment variables
You can use Visual Studio to detect and maintain the installation path in the following environment variables:
- Adt_home points to the Android installation path.
- Ant_home points to the ANT folder on your computer.
- Git_home points to the GIT installation path.
- Java_home points to the JAVA installation path.
Visual Studio uses these environment variables when you create and run your app. You can View environment variables and modify their values through the Visual Studio Options dialog box.
- on the Visual Studio menu bar, choose tools and options .
- In the Options dialog box, select the tool that applies to Apache Cordova, and then select Environment Variable Overrides.
- Select the check box for the item you want to modify, and then modify the value.
To reset an environment variable to its default value, uncheck its check box or select Reset to default.
Create a Cordova cross-platform app to create a new project
- Open Visual Studio as an administrator user. On the menu bar, choose File, new, project.
Visual Studio creates a new project that contains the following files in the solution Explorer
The new Cordova project directory structure:
- merges The special code that stores each platform, compiles with the WWW directory merge, the same file merges under the code file takes precedence.
- plugins is the plug-in directory, Cordova native APIs that access local device properties are also available as plug-ins.
- Res is suitable for special resources (icons and splash screens) for each platform.
- www contains the application code.
- CSS contains the basic CSS style for the default blank template.
- Images recommended images are saved here.
- config file that contains the project
- Taco.json Storage enables Visual Studio to build project metadata on non-Windows operating systems like Mac
- www\index.html is the default main page of the app.
- project_readme.html contains links to useful information.
https://msdn.microsoft.com/en-us/library/dn771552 (v=vs.140). aspx
Microsoft MVP--Windows Platform development,
Hortonworks Certified Apache Hadoop 2.0 Developer
Introduction to Visual Studio 2015 and Apache Cordova cross-platform development (i)