Windows8 under PhoneGap 4 + Android Studio 1.0 + VS2013 Configuration Guide

Source: Internet
Author: User
Tags docs download

1. Preparatory work
    • Installing jdk1.6+, setting environment variables
Java_homec:\program files\java\jdk1. 5. 0_07classpath.; %java_home%\libpath%java_home%\bin
    • Installing ant, setting environment variables
ant_homed:\apache-ant-1.8.2                     pathd:\apache-ant-1.8.2\bin
    • Install the Android SDK, set environment variables
Android_homec:\program Files\android\sdkpath%android_home%\tools;%android_home%\platform-tools;% android_home%\build-tools\20.0.0;
    • Installing the VS2013 WP8 Simulator

2. Download node. js

http://nodejs.org/download 32-bit or 64-bit version

3. Running node. js Command Prompt

Input

c:\> NPM install-g PhoneGap

PhoneGap saved in c:\users\[user name]\appdata\roaming\npm

4. Execute under the project directory
$ phonegap Create my-app$ cd my-app$ phonegap run Android$ phonegap Run WP8

PhoneGap will automatically establish My-app folder, different platform items under Platforms folder cached content under c:\users\[username]\.cordova\lib

5. Android Project

Eclipse->import Import Project can be Android Studio 1.0: due to Android studio 1.0 The default installation is Android5.0, the compiler version is 21,gradle the current version is 2.2.1, so make some changes to the relevant files
1) Modify the selection My-app\platforms\android\build.gradle

Line 10th classpath ' com.android.tools.build:gradle:1.0.+"21.1.1"  = ' 2.2.1 '

2) Modify My-app\platforms\android\project.properties

Line 13th target=android-21

3) Modify My-app\platforms\android\androidmanifest.xml

Line 13th <USES-SDK android:minsdkversion="ten" android:targetsdkversion="  + " />

4) Modify My-app\platforms\android\cordovalib\build.gradle

Line 28th Classpath ' com.android.tools.build:gradle:1.0.+"21.1.1"

5) Modify My-app\platforms\android\cordovalib\project.properties

Line 13th target=android-21

6) Modify My-app\platforms\android\cordovalib\androidmanifest.xml

Line 22nd <USES-SDK android:minsdkversion="ten" />

7) Import,my-app\platforms\android\build.gradle

Gradle download path for the c:\users\[user name]\.gradle\wrapper\dists, you can download the download tool to the appropriate directory, and create a new content is empty Gradle-2.2.1-all.zip.ok file 8, if the compilation error , prompt for task ' not found in root project ' Android ', then open ANDROID.IML, click "Sync".

6. WP8 Project

Open My-app\platforms\wp8\hello_world.sln directly to execute

In addition, help documents can be read offline after Https://github.com/apache/cordova-docs download

Windows8 under PhoneGap 4 + Android Studio 1.0 + VS2013 Configuration Guide

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.