2016-08-23 1 views
1

Я использую Cordova 6.3.1. Попытка построить iOS с использованием CLI Cordova дает проблему, как показано ниже. $ cordova build ios Кордова не строится - Платформа Config.xml неверна

Error: Pruning at selector "/widget/plugins" from "/Users/path/to/cordova/project/cordova/platforms/ios/Myproj/config.xml" went bad. 

я получаю ту же ошибку при обновлении платформы:

$ cordova platform update ios 

Updating ios project... 
iOS project updated with [email protected] 
Error: Pruning at selector "/widget/plugins" from "/Users/path/to/cordova/project/cordova/platforms/ios/Myproj/config.xml" went bad. 

1) Что именно означает эта ошибка обрезку?

Я заметил, что config.xml, расположенный в кордове/platform/ios/Myproj /, не содержит никакой информации из моего корневого config.xml. Это просто файл по умолчанию, который начинается так:

<widget xmlns  = "http://www.w3.org/ns/widgets" 
     id  = "io.cordova.helloCordova" 
     version = "2.0.0"> 
    <name>HelloCordova</name> 

    <description> 
     A sample Apache Cordova application that responds to the deviceready event. 
    </description> 

Мой файл config.xml корень начинается так:

<?xml version='1.0' encoding='utf-8'?> 
<widget id="com.myproj.app" version="1.0.38" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>Myproj</name> 
    <description> 
     Some description. 
    </description> 

Между тем, установка, казалось, хорошо, когда я сделал следующее, чтобы добавить платформа:

$ cordova platform add ios 

Adding ios project... 
Creating Cordova project for the iOS platform: 
     Path: ../../../../../desktop/dev/path/to/my/project/cordova/platforms/ios 
     Package: com.myproj.app 
     Name: Myproj 
iOS project created with [email protected] 
Installing "com.mbppower.camerapreview" for ios 
Installing "com.phonegap.plugins.PushPlugin" for ios 
Installing "cordova-plugin-device" for ios 
Installing "cordova-plugin-globalization" for ios 
Installing "com.telerik.plugins.healthkit" for ios 
Installing "com.transistorsoft.cordova.background-geolocation" for ios 
Installing "cordova-plugin-dialogs" for ios 
Installing "cordova-plugin-background-fetch" for ios 
Installing "cordova-plugin-afnetworking" for ios 
Plugin "cordova-plugin-background-fetch" already installed on ios. Making it top-level. 
Installing "cordova-plugin-camera" for ios 
Installing "cordova-plugin-compat" for ios 
Dependent plugin "cordova-plugin-compat" already installed on ios. 
Installing "cordova-plugin-console" for ios 
Plugin "cordova-plugin-device" already installed on ios. Making it top-level. 
Plugin "cordova-plugin-dialogs" already installed on ios. Making it top-level. 
Installing "cordova-plugin-file" for ios 
Dependent plugin "cordova-plugin-compat" already installed on ios. 

The Android Persistent storage location now defaults to "Internal". Please check this plugins README to see if you application needs any changes in its config.xml. 

If this is a new application no changes are required. 

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add: 

     "<preference name="AndroidPersistentFileLocation" value="Compatibility" />" 

to config.xml in order for the application to find previously stored files. 


Installing "cordova-plugin-file-transfer" for ios 
Dependent plugin "cordova-plugin-file" already installed on ios. 
Installing "cordova-plugin-geolocation" for ios 
Dependent plugin "cordova-plugin-compat" already installed on ios. 
Dependent plugin "cordova-plugin-globalization" already installed on ios. 
Installing "cordova-plugin-http" for ios 
Dependent plugin "cordova-plugin-file" already installed on ios. 
Installing "cordova-plugin-inappbrowser" for ios 
Installing "cordova-plugin-media-capture" for ios 
Dependent plugin "cordova-plugin-file" already installed on ios. 
Dependent plugin "cordova-plugin-compat" already installed on ios. 
Installing "cordova-plugin-pedometer" for ios 
Installing "cordova-plugin-photokandy-video-thumbnail" for ios 
Dependent plugin "cordova-plugin-file" already installed on ios. 
Installing "cordova-plugin-whitelist" for ios 
Installing "phonegap-plugin-barcodescanner" for ios 

2) Как работает установка платформы? Более конкретно, как он сообщает, что должно быть в конфигурационном файле config.xml?

Надеюсь, на эти вопросы можно ответить в контексте для запуска моей сборки. Некоторые другие справочные данные: я использую Sencha Touch и строю с $sencha app build native с использованием Sencha Cmd, который инициировал исходную папку проекта Кордовы.

ответ

0

cordova plugins --list open x-code найти эти плагины Возможно, в списке плагинов cordova есть плагины, но проект ios нет.

вы можете удалить его DIY и установить снова platform > ios > fecth.json or ios.json or package.json надеюсь полезным

извините, я не очень хорошо на английском.

0

Для меня решение с этой должности разработаны: Cordova pruning error for android config xml

Вы должны удалить все плагины и платформы, обновления Кордову, а затем добавить снова все плагины и платформы. Для очистки плагинов и моя ИОС платформа я написал НПМ сценарий:

{ 
    ... 
    "rm-plugins": "cordova plugins list | awk '{print $1}' | xargs cordova plugins rm", 
    "rm-platforms": "cordova platforms remove ios", 
    "cleanup": "npm run rm-platforms && npm run rm-plugins && npm update cordova" 
    ... 
} 

PS: Я не совсем то же самое сообщение об ошибке, как у вас было:

Error: Pruning at selector "/*/plugins" from "/Users/Thomas/work/repos/nexboard/iOS/nexboard/platforms/ios/neXboard/config.xml" went bad. 
Смежные вопросы