Apache Cordova Development Environment Build (i)-visual Studio

Source: Internet
Author: User

Original: Apache Cordova development Environment Construction (i)-visual Studio

First, use Visual Studio to develop Apache Cordova mobile app

1. Version requirements, Visual Studio requirements 2015 or 2017

2. After the installation, tick the JavaScript app Apache Cordova and the tools you depend on.


3.

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 needed to manually add a git URI for a specific Cordova plugin.
    • android build process requires Apache Ant 1.8.0 or later.
    • android build process requires the use of 32-bit Oracle Java JDK 7. Note: 64-bit Java is not supported. It is recommended to use JAVA8
    • android build process and Ripple needed Android SDK.
    • apple itunes deploys the app to iOS devices.

Second, VisualStudio2015 or later installed, you need to configure the environment variable

Many times, for the installation speed of VS, the JDK, ANDROIDSDK, etc. will not be selected when installing vs. You can use a previously installed.

In such cases, the environment variable configuration must be performed.

1. In order to better reduce errors, it is recommended to modify the system's environment variables directly

JDK environment variable Configuration

Apache Ant Introduction and Configuration

ANDROIDSDK and environment variable configuration

2. You can, of course, modify it separately in the VS configuration, and you can use Visual Studio to detect and maintain the installation path in the following environment variables:

    • adt_home ? point to the Android installation path.
    • ANT_ HOME ? Point to the Ant folder on your computer.
    • GIT_ HOME ? Point to the Git installation path.
    • JAVA_ HOME ? Point to the Java installation path.

Visual Studio? ? can you pass ? Visual studio "

  1. in the ? Visual Studio? on the menu bar, select " Tools " and the " Options " .
  2. In the Options dialog box, select the tool that applies to Apache Cordova, and then select Environment Variable Overrides.
  3. Select the check box for the item you want to modify, and then modify the value.

Iii. creating a Corodva project with VS

1. Create a project


2. Create the results as follows, the CONFIG. Metabase configurator, you can configure information for each platform, and install the management Cordova plugin.


3. Directory Structure description

    • merges? The special code for each platform, compiled with the WWW directory merge, and the same file merges the code file first.
    • plugins ? That is, the plug-in directory, the native API that accesses local device properties is also provided as a plug-in.
    • res ? Special resources for each platform (icon and splash screen).
    • www? Contains the application code.
      • css The basic CSS style that contains the default blank template.
      • images recommended pictures to be saved here.

?

    • configfile containing the project
    • Taco.json? Storage enables Visual Studio to build project metadata on a non-Windows operating system like a Mac
    • www\index.html? is the default main page of the app.
    • project_readme.html? Contains links to useful information.
4. If the build is successful, the installation package under the corresponding platform can be used directly.


Iv. the problems frequently encountered in the initial use of the Cordova Project are summarized as follows:

    1. VS2015 generating Apache Cordova Project no response
    2. vs2015 generate Cordova Page Chinese garbled
    3. VS Android App startup Debug could not locate the Android debug Bridge (Adb.exe)
    4. Cordova page Load External screen picture failed, refused to load the image
    5. Cordova Configure WebView to open external links

More:

Apache Cordova Development Environment Build (ii) VS Code

Cordova Event Collation

Cordova-plugin-vibration Equipment Vibration Finishing

More Reference articles:

1.1190000002536799

2.https://blogs.msdn.microsoft.com/visualstudio_cn/2015/03/24/apache-cordovamacvisual-studio/


Apache Cordova Development Environment Build (i)-visual Studio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.