简体   繁体   English

如何更新visual studio 2015 cordova项目中的cordova-ios版本?

[英]how to update cordova-ios version in visual studio 2015 cordova project?

I'm developing ios app using cordova template in visual studio 2015. I have configured mac book as described in this link . 我正在使用visual studio 2015中的cordova模板开发ios应用程序。我已经按照此链接中的描述配置了mac book。 https://taco.visualstudio.com/en-us/docs/ios-guide/#run-your-app-in-an-ios-simulator . https://taco.visualstudio.com/en-us/docs/ios-guide/#run-your-app-in-an-ios-simulator Installed xcode version is 8.3. 安装的xcode版本是8.3。 when i try to run app in an ios simulator , getting following error. 当我尝试在ios模拟器中运行应用程序时,会出现以下错误。 so, how to fix this, please help .thanks. 所以,如何解决这个问题,请帮助。谢谢。

Error: Remote build error from the build server Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3. 错误:构建服务器的远程构建错误构建失败,错误Remotebuild要求您的项目在XCode 8.3中使用cordova-ios 4.3.0或更高版本。 Please update your cordova-ios version. 请更新您的cordova-ios版本。

From this link you can see how to update cordova: 此链接中,您可以看到如何更新cordova:

npm update -g cordova

On next link you can find instructions for ios cordova update. 在下一个链接中,您可以找到有关ios cordova更新的说明。 Basically its just removing ios platform and adding it back again for projects built with Cordova 4.x version: 基本上它只是删除ios平台并将其添加回用于使用Cordova 4.x版本构建的项目:

cordova platform rm ios
cordova platform add ios

For older versions use: 对于旧版本,请使用:

cordova platform update ios

Visual Studio 2015 was forcing the 4.1.1 version for cordova-ios. Visual Studio 2015强制使用了cordova-ios的4.1.1版本。

This worked for me on the command line: 这在命令行上对我有用:

cordova platform add ios@4.3.1

cordova-ios 4.3.1 cordova-ios 4.3.1

Note: And i deleted the "bld" folder from the cordova project root. 注意:我从cordova项目根目录中删除了“bld”文件夹。

This is what worked for me in Visual Studio 2017 Community Edition. 这在Visual Studio 2017社区版中对我有用。

1) Delete the platforms / ios folder in the root folder of your project 1)删除项目根文件夹中的platforms / ios文件夹

2) In the platforms folder, edit the platforms.json file manually with the version you want, in my case it was: 2)在platforms文件夹中,使用你想要的版本手动编辑platforms.json文件,在我的例子中是:

{
"android": "5.2.1",
"ios": "4.3.0"
}

3) Update your config.xml file in your project like so: 3)更新项目中的config.xml文件,如下所示:

  <engine name="ios" spec="4.3.0" />

4) Run your project. 4)运行你的项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2015更新1 RC Apache Cordova 4没有项目文件 - Visual Studio 2015 Update 1 RC Apache Cordova 4 no project files 在Visual Studio 2015中加载一个孤儿Cordova项目 - Load an orphan cordova project in visual studio 2015 将Visual Studio 2015 RTM从更新1更新为更新2,现在Cordova项目为“不兼容” - Updated Visual Studio 2015 RTM from Update 1 to Update 2, now Cordova Project is “Incompatible” Visual Studio 2015 Apache Cordova项目文件未包含到项目中并已隐藏 - Visual Studio 2015 Apache Cordova Project Files not included to project and hidden iOS模拟器或运行设备Visual Studio 2015 Apache Cordova - IOS Simulator or Run device visual studio 2015 apache cordova Visual Studio 2015无法为Cordova项目创建发布版本 - Visual Studio 2015 cannot create Release builds for Cordova project Cordova项目中的调试目标Visual Studio 2015只显示启动 - Debug target in Cordova project Visual Studio 2015 show only start Visual Studio 2015 Cordova项目Typescript的路径在哪里? - Where is Visual Studio 2015 Cordova project path to Typescript? 用于Apache Cordova Update 4的Visual Studio(2015)工具无法安装 - Visual studio (2015) tools for Apache Cordova Update 4 failed to install 在Visual Studio 2015 Cordova模板项目中使用NuGet或Bower - Use NuGet or Bower in Visual Studio 2015 Cordova Template Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM