Ошибка сборки Phonegap: о боже. Ваша сборка не удалась

#jquery #cordova #phonegap-plugins #phonegap-build

#jquery #кордова #phonegap-плагины #phonegap-build

Вопрос:

Проблема: я использую платформу сборки Phonegap для разработки моего приложения для iOS. Во время сборки я добавил в приложение сертификаты .p12 и .mobile provision и разблокировал. Во время перестройки я столкнулся со странной ошибкой «О боже. Ваша сборка не удалась. Извините, но на сервере сборки возникла проблема «. введите описание изображения здесьИтак, как обычно, когда я заглянул в Google, я нашел здесь, в котором говорится, что нам нужно разместить сторонний плагин после размещения плагинов phonegap / cardova. Но все равно не повезло!. Я использую 8 плагинов phonegap и 1 сторонний плагин. Пожалуйста, обратитесь к приведенному ниже удобному XML-файлу.

Мой config.xml :

 <?xml version="1.0" encoding="UTF-8"?>

 <!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
 <widget xmlns     = "http://www.w3.org/ns/widgets"
    xmlns:gap = "http://phonegap.com/ns/1.0"
    id        = "com.my.app"
    version   = "1.0">

<name>My app name</name>

<description>
  my first app in phonegap
</description>

<author href="http://myself.com" email="support@myself.com">
    myself
</author>

<preference name="permissions"                value="none"/>
<!-- Customize your app and platform with the preference element. -->
<preference name="phonegap-version"           value="3.3.0" />    <!-- all: current version of PhoneGap -->
<preference name="orientation"                value="default" />        <!-- all: default means both landscape and portrait are enabled -->
<preference name="target-device"              value="universal" />      <!-- all: possible values handset, tablet, or universal -->
<preference name="fullscreen"                 value="true" />           <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce"              value="false" />           <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="prerendered-icon"           value="true" />           <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
<preference name="stay-in-webview"            value="false" />          <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
<preference name="ios-statusbarstyle"         value="black-opaque" />   <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="detect-data-types"          value="true" />           <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
<preference name="exit-on-suspend"            value="false" />          <!-- ios: if set to true, app will terminate when home button is pressed -->
<preference name="show-splash-screen-spinner" value="true" />           <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
<preference name="auto-hide-splash-screen"    value="true" />           <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="disable-cursor"             value="false" />          <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
<preference name="android-minSdkVersion"      value="10" />              <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="android-installLocation"    value="auto" />           <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->
<preference name="SplashScreenDelay" value="1000" />


 <!-- make the statusbar hiden from webview -->
 <gap:plugin name="com.phonegap.plugin.statusbar" /> 
 <preference name="StatusBarOverlaysWebView" value="false" />

 <gap:plugin name="org.apache.cordova.battery-status" /> 
<!-- <gap:plugin name="org.apache.cordova.camera" /> -->
<!-- <gap:plugin name="org.apache.cordova.media-capture" /> -->
<!-- <gap:plugin name="org.apache.cordova.console" /> -->
<!-- <gap:plugin name="org.apache.cordova.contacts" /> -->
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.device-motion" />
<gap:plugin name="org.apache.cordova.device-orientation" />
<!-- <gap:plugin name="org.apache.cordova.dialogs" /> -->
<!-- <gap:plugin name="org.apache.cordova.file" /> -->
<!-- <gap:plugin name="org.apache.cordova.file-transfer" /> -->
<!-- <gap:plugin name="org.apache.cordova.geolocation" /> -->
<!-- <gap:plugin name="org.apache.cordova.globalization" /> -->
<!-- <gap:plugin name="org.apache.cordova.inappbrowser" /> -->
<gap:plugin name="org.apache.cordova.media" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<!--  <gap:plugin name="org.apache.cordova.vibration" />  -->
<gap:plugin name="com.rjfun.cordova.plugin.lowlatencyaudio" />

 <access origin="*" />   

  <!-- Defined splash screen  and icons here and works fine ... -->
 

Вопрос: Какова реальная причина этой ошибки? Есть какое-нибудь четкое и быстрое решение для этого?

/ * ** ОБНОВЛЕНИЕ ** */

Я могу преодолеть эту ошибку!! Но только если я добавлю эти ненужные плагины [раскомментированные оставшиеся 11 плагинов в config.xml файл]. Есть ли какое-либо решение, позволяющее избежать этих плагинов и устранить эту ошибку? Любая помощь с благодарностью и заранее благодарна.

Комментарии:

1. Вы пробовали удалять закомментированные строки?

2. @DawsonLoudon : ДА ! Если я создам без комментариев плагины, это будет работать. Но я не хочу включать эти плагины, так как я ими не пользуюсь.

3. Правильно, я предлагаю вместо того, чтобы комментировать их, удалить эти строки, поскольку они не нужны. Мне интересно, вызывают ли закомментированные строки ошибку сборки? Так что, возможно, попробуйте удалить их все вместе, и это может решить проблему.

Ответ №1:

 <feature name="http://api.phonegap.com/1.0/device" />
<feature name="http://api.phonegap.com/1.0/network" />
<feature name="http://api.phonegap.com/1.0/camera" />

<plugin name="Camera" value="org.apache.cordova.CameraLauncher" />
<plugin name="Geolocation" value="org.apache.cordova.Geolocation" />

<gap:plugin name="org.apache.cordova.battery-status" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:plugin name="org.apache.cordova.media-capture" />
<gap:plugin name="org.apache.cordova.console" />
<gap:plugin name="org.apache.cordova.contacts" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.device-motion" />
<gap:plugin name="org.apache.cordova.device-orientation" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.file" />
<gap:plugin name="org.apache.cordova.file-transfer" />
<gap:plugin name="org.apache.cordova.geolocation" />
<gap:plugin name="org.apache.cordova.globalization" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.media" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="org.apache.cordova.vibration" />

<gap:config-file platform="ios" parent="UIStatusBarHidden">
    <true/>
</gap:config-file>
<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance">
    <false/>
</gap:config-file>    

<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="permissions" value="none" />
<preference name="orientation" value="default" />
<preference name="phonegap-version" value="3.6.3" />  
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="auto" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-windowSoftInputMode" value="adjustResize" />
 

Обновите config.xml как и приведенный выше код. Я думаю, что это работа. Это моя ошибка, как и вы;

О боже. Ваша сборка не удалась. Извините, но на сервере сборки возникла проблема, сообщите нам

Второе решение. Если ваш config.xml версия геолокации 0.3.10 заменить на 0.3.7

 <gap:plugin name="org.apache.cordova.geolocation" version="0.3.10" />
 

Замените на это

 <gap:plugin name="org.apache.cordova.geolocation" version="0.3.7" />