Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cordova Ionic应用程序在android上运行,但在iOS上安装多个插件时出错_Cordova_Ionic Framework_Ionic2_Ionic3_Ionic Native - Fatal编程技术网

Cordova Ionic应用程序在android上运行,但在iOS上安装多个插件时出错

Cordova Ionic应用程序在android上运行,但在iOS上安装多个插件时出错,cordova,ionic-framework,ionic2,ionic3,ionic-native,Cordova,Ionic Framework,Ionic2,Ionic3,Ionic Native,我的应用程序在android上运行良好,但使用相同的插件,该应用程序会为各种插件提供多个插件安装错误 错误: [Warning] Ionic Native: tried calling HTTP.setDataSerializer, but the HTTP plugin is not installed. (vendor.js, line 61253) [Warning] Install the HTTP plugin: 'ionic cordova plugin add cordova-pl

我的应用程序在android上运行良好,但使用相同的插件,该应用程序会为各种插件提供多个插件安装错误

错误:

[Warning] Ionic Native: tried calling HTTP.setDataSerializer, but the HTTP plugin is not installed. (vendor.js, line 61253)
[Warning] Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http' (vendor.js, line 61265)
[Warning] 'Ionic Native: tried accessing the SecureStorage plugin but it's not installed. (vendor.js, line 61262)
[Warning] Install the SecureStorage plugin: 'ionic cordova plugin add cordova-plugin-secure-storage' (vendor.js, line 61265)
[Warning] Ionic Native: tried calling AppVersion.getAppName, but the AppVersion plugin is not installed. (vendor.js, line 61253)
[Warning] Install the AppVersion plugin: 'ionic cordova plugin add cordova-plugin-app-version' (vendor.js, line 61265)
[Warning] Ionic Native: tried calling HTTP.setDataSerializer, but the HTTP plugin is not installed. (vendor.js, line 61253)
[Warning] Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http' (vendor.js, line 61265)
[Warning] Ionic Native: tried calling HTTP.setSSLCertMode, but the HTTP plugin is not installed. (vendor.js, line 61253)
[Warning] Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http' (vendor.js, line 61265)
[Warning] Ionic Native: tried calling HTTP.post, but the HTTP plugin is not installed. (vendor.js, line 61253)
[Warning] Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http' (vendor.js, line 61265)
已经采取的步骤:

  • 新节点\u模块、插件、平台文件夹
  • 在cordova ios 4.5.4和cordova ios 5.0.1上测试
  • 检查是否安装了插件和npm依赖项
  • 确保在isPlatformReady()之后调用本机命令
离子型:

   Ionic CLI          : 5.2.8 (/Users/xx/.nvm/versions/node/v10.14.0/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 21 other plugins)

Utility:

   cordova-res : 0.6.0 (update available: 0.8.0)
   native-run  : 0.2.8 

System:

   Android SDK Tools : 26.1.1 (/Users/xx/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v10.14.0 (/Users/xx/.nvm/versions/node/v10.14.0/bin/node)
   npm               : 6.5.0
   OS                : macOS Mojave
   Xcode             : Xcode 11.1 Build version 11A1027
已安装的插件:

com.adjust.sdk 4.18.0 "Adjust"
cordova-clipboard 1.3.0 "Clipboard"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-advanced-http 2.2.0 "Advanced HTTP plugin"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-firebase-lib 5.1.1 "Google Firebase Plugin"
cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-is-debug 1.0.0 "IsDebug"
cordova-plugin-media 5.0.3 "Media"
cordova-plugin-media-capture 3.0.3 "Capture"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-secure-storage 3.0.2 "SecureStorage"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 5.6.0 "SocialSharing"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"

我也遇到过类似的问题,解决方法通常是删除插件文件夹并从终端运行
cordova prepare

当我遇到奇怪的错误时,最好的解决方法是清理并重置项目

  • 删除文件夹:节点模块、平台、插件、www
  • 使用
    npm i
  • 运行爱奥尼亚cordova运行ios

package.json保存恢复项目所需的所有依赖项和插件信息

您应该检查文件夹是否具有适当的权限,然后尝试删除platform for ios,然后重新安装,但如果仍然无法正常工作,则获取未为ios安装的插件列表并手动安装。有时插件不会为ios安装,然后使用“-force”安装它们