用phone gap开发windows phone应用 - Get Started Guide

  根据phonegap版本不一样,phonegap和visual studio集成开发不同,文中红色部分是我加上的

  • 1. Requirements

    • Windows 7 or Windows Vista with SP2

    Note: Running in VM has issues, if you are on a Mac, you will need to setup a bootcamp partition with Windows 7 or Vista

    Necessary for Installing on Device and Submitting to Market Place:

  • 2. Install SDK + PhoneGap

    Download and install the Windows Phone SDK.


    Download the latest copy of PhoneGap and extract its contents. Navigate to the Windows Phone directory and copy the filePhoneGapStarter.zip to your templates folder located at C:\Users\[USERNAME]\Documents\Visual Studio 2010\Templates\ProjectTemplates\Silverlight for Windows Phone

   现在下载的是更高版本的phonegap,下载下来后有不同平台的开发工具,如下:

       

将CordovaStarter-1.7.0.zip拷贝到C:\Users\[USERNAME]\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#下

  • 3. Setup New Project

    • Open Visual Studio Express for Windows Phone and choose New Project.
    • Select PhoneGapStarter.
    • Give your project a name, and select OK.

实际我们看到的界面如下:

以上图看到有两个CordovaStarter,是因为我将两个版本的都放到了templates里

  • 4. Review the project structure

    • The 'www' folder contains your PhoneGap html/js/css and any other resources included in your app.
    • Any content that you add here needs to be a part of the Visual Studio project, and it must be set as content.
  • 5. Build and Deploy to Emulator

    • Make sure to have Windows Phone Emulator selected in the top drop-down menu.
    • Hit the green play button beside the Windows Phone Emulator drop-down menu to start debugging or press F5.

  • 6. Build your project for the device

    In order to test your application on a device, the device must be registered. Clickhere to read documentation on deploying and testing on your Windows Phone.

    • Make sure your phone is connected, and the screen is unlocked
    • In Visual Studio, select 'Windows Phone Device' from the top drop-down menu.
    • Hit the green play button beside the drop-down menu to start debugging or press F5.
  • Done!

    You can also checkout the wiki version of this guide here.

原文: http://phonegap.com/start#wp


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值