我有我建立在PhoneGap的2.7.I Android应用程序安装的PhoneGap 3.5使用cmd并试图升级的应用程序,如下所示
I have an android application that i built on PhoneGap 2.7.I installed phonegap 3.5 using cmd and tried to upgrade an app as shown here
如何升级的PhoneGap在我的PhoneGap的应用程序?
但是当我做它用CMD它给了我下面的错误:
But when i do it using cmd it gives me the following error:
与PhoneGap的3.5,我建的PhoneGap 2.7没有一个平台folder.So那我咋办?我如何可以验证它是否是升级与否的Android应用程序?
Unlike phonegap 3.5 the android application that I built in PhoneGap 2.7 does not have a platform folder.So what am I supposed to?and how can I verify if it is upgraded or not?
我也看到了这些PhoneGap的文档
I had also seen these phonegap documentation
的http://docs.phonegap.com/en/3.5.0/guide_platforms_android_upgrade.md.html#Upgrading%20Android
不过,这并不说明如何直接升级为2.7至3.5
But It does not show how to directly upgrade from 2.7 to 3.5
我不认为PhoneGap的平台更新工程从较旧的3.X升级的东西。
I don't think phonegap platform update works for upgrading from something older than 3.x.
有关的PhoneGap /科尔多瓦CLI来解决它必须检测一个项目3.x的项目的结构。
For phonegap/cordova cli to work it has to detect a project with the structure of 3.x projects.
要升级项目2.X,你必须
To upgrade your project in 2.x you have to
在安装的PhoneGap或科尔多瓦CLI(你似乎已经做了,但如果你不打算使用的PhoneGap构建计划,我建议你使用 科尔多瓦代替的PhoneGap。如果没有,请更换科尔多瓦通过的PhoneGap 在接下来的步骤) 打开一个cmd和CD到一个文件夹中至极,你会想要把你的项目这是你在你的旧项目有WWW文件夹中创建新的项目: install phonegap or cordova cli (which you seem to already have done, but if you don't plan on using phonegap build, I suggest you use cordova instead of phonegap. if not please replace cordova by phonegap in next steps) open a cmd and cd to a folder in wich you will want to put your project
create the new project from the www folder you had in your old project:
科尔多瓦创造nameforprojectfolder com.test.app Testapp --copy - 从= pathtooldwwwfolder
cordova create nameforprojectfolder com.test.app Testapp --copy-from=pathtooldwwwfolder
改变当前目录到新建的文件夹
change current dir to the newly created folder
添加Android平台:
add the android platform:
科尔多瓦平台添加的android
cordova platform add android
无插件默认情况下添加,所以你必须添加您使用的所有插件:
in cordova/phonegap 3.x no plugin is added by default so you will have to add all the plugins you use :
科尔多瓦插件添加uri.of.plugin
cordova plugin add uri.of.plugin
自定义的config.xml您的需求
customize config.xml to your needs
打造的Android项目(这将创建在平台上的文件/文件夹的android)
build the android project (this will create files in the platforms/android folder)
科尔多瓦构建Android
cordova build android
您可能需要在平台上定制的AndroidManifest.xml /安卓/ AndroidManifest.xml中
You may need to customize AndroidManifest.xml in platforms/android/AndroidManifest.xml
现在,您可以使用CLI与您的项目工作。
Now you can use the CLI to work with your project.