3 Replies Latest reply on Aug 18, 2016 1:21 AM by javierv860545

    Build error


      Hello everybody,


      I am getting an error when building the app, is extrange because yesterday it worked correctly and I was able to build correctly, now the log shows this error:

      ------------------------------------------------------------------------------------------ ----------------------------------------------------------------------




      Fetching plugin "cordova-plugin-whitelist" via npm

      Installing "cordova-plugin-whitelist" at "1.2.2" for android


                     This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.




      ERROR: Invalid filename / directory found in package -




      ------------------------------------------------------------------------------------------ ----------------------------------------------------------------------

      At first I thought that could be because of I was using the default version of PhoneGap, which was just updated from cli-5.2.0 to cli-6.3.0.

      So I changed the line:

          <preference name="phonegap-version" value="cli-6.3.0" />  to this:

          <preference name="phonegap-version" value="cli-5.2.0" />


      But the error in the log is the same...



      Any idea why is this happening or how to solve it?


      Thank you very much for your help


      For more information I attach my 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"

              xmlns:android = "http://schemas.android.com/apk/res/android"

              id        = "com.test.TestApp"

              version   = "1.0.0">


          <name>Test App</name>



              App de Test



          <author href="http://www.test.com/" email="info@test.com">




          <!-- Customize your app and platform with the preference element. -->

          <preference name="phonegap-version" value="cli-5.2.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="true" />           <!-- 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="14" />              <!-- 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. -->



          <!-- Eliminar el OverScroll-->   

          <preference name="DisallowOverscroll" value="true" />   

          <!-- Preferencias de control de splahscreen-->   

          <preference name="AutoHideSplashScreen" value="false" />

          <preference name="SplashScreenDelay" value="2000" />

          <preference name="FadeSplashScreenDuration" value="750"/>

          <!-- Preferencias de control para que espere al menos un minuto si la url no carga-->       

          <preference name="loadUrlTimeoutValue" value="60000" />



          <!-- Necesario para instalar Pushwoosh-->

          <preference name="android-build-tool" value="gradle" />




          <!-- Plugins -->


          <!-- Core plugins -->

          <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="org.apache.cordova.vibration" />


          <!--Eliminar Status Bar -->       

          <plugin name="de.appplant.cordova.plugin.hidden-statusbar-overlay" spec="1.2.0" source="pgb" />   


          <!-- Chromium webview -->   

          <plugin name="org.crosswalk.engine" spec="1.3.0" source="pgb" />


          <!-- Pushwoosh plugin -->

          <gap:plugin name="pushwoosh-pgb-plugin" source="npm" />




          <!-- Define app icon for each platform. -->

          <icon src="icon.png" />

          <icon src="res/icon/android/icon-36-ldpi.png"   gap:platform="android"    gap:density="ldpi" />

          <icon src="res/icon/android/icon-48-mdpi.png"   gap:platform="android"    gap:density="mdpi" />

          <icon src="res/icon/android/icon-72-hdpi.png"   gap:platform="android"    gap:density="hdpi" />

          <icon src="res/icon/android/icon-96-xhdpi.png"  gap:platform="android"    gap:density="xhdpi" />

          <icon src="res/icon/blackberry/icon-80.png"     gap:platform="blackberry" />

          <icon src="res/icon/blackberry/icon-80.png"     gap:platform="blackberry" gap:state="hover"/>

          <icon src="res/icon/ios/icon-57.png"            gap:platform="ios"        width="57" height="57" />

          <icon src="res/icon/ios/icon-72.png"            gap:platform="ios"        width="72" height="72" />

          <icon src="res/icon/ios/icon-57-2x.png"         gap:platform="ios"        width="114" height="114" />

          <icon src="res/icon/ios/icon-72-2x.png"         gap:platform="ios"        width="144" height="144" />

          <icon src="res/icon/webos/icon-64.png"          gap:platform="webos" />

          <icon src="res/icon/windows-phone/icon-48.png"  gap:platform="winphone" />

          <icon src="res/icon/windows-phone/icon-173.png" gap:platform="winphone"   gap:role="background" />


          <!-- Define app splash screen for each platform. -->

          <gap:splash src="res/screen/android/screen-ldpi-portrait.png"  gap:platform="android" gap:density="ldpi" />

          <gap:splash src="res/screen/android/screen-mdpi-portrait.png"  gap:platform="android" gap:density="mdpi" />

          <gap:splash src="res/screen/android/screen-hdpi-portrait.png"  gap:platform="android" gap:density="hdpi" />

          <gap:splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:density="xhdpi" />

          <gap:splash src="res/screen/blackberry/screen-225.png"         gap:platform="blackberry" />

          <gap:splash src="res/screen/ios/screen-iphone-portrait.png"    gap:platform="ios"     width="320" height="480" />

          <gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios"     width="640" height="960" />

          <gap:splash src="res/screen/ios/screen-ipad-portrait.png"      gap:platform="ios"     width="768" height="1024" />

          <gap:splash src="res/screen/ios/screen-ipad-landscape.png"     gap:platform="ios"     width="1024" height="768" />

          <gap:splash src="res/screen/windows-phone/screen-portrait.jpg" gap:platform="winphone" />



              Define access to external domains.


              <access />            - a blank access tag denies access to all external resources.

              <access origin="*" /> - a wildcard access tag allows access to all external resource.


              Otherwise, you can specify specific domains:




          <access origin="*"/> <!-- allow all pages -->

          <access origin="*.pushwoosh.com"/> <!-- allow pushwoosh service -->

          <!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin -->

          <!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html -->

          <plugin name="cordova-plugin-whitelist" version="1" />

          <allow-intent href="http://*/*" />

          <allow-intent href="https://*/*" />

          <allow-intent href="tel:*" />

          <allow-intent href="sms:*" />

          <allow-intent href="mailto:*" />

          <allow-intent href="geo:*" />

          <platform name="android">

              <allow-intent href="market:*" />


          <platform name="ios">

              <allow-intent href="itms:*" />

              <allow-intent href="itms-apps:*" />




          <!-- Para eliminar el title bar antes del splashscreen -->

          <!-- Y esta otra linea al principio: xmlns:android = "http://schemas.android.com/apk/res/android" -->

          <gap:config-file platform="android" parent="/manifest">




                  android:smallScreens="true" />

              <application android:theme="@android:style/Theme.NoTitleBar" >

                  <activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >




          <!-- Para eliminar el title bar antes del splashscreen -->



      ------------------------------------------------------------------------------------------ ----------------------------------------------------------------------

        • 1. Re: Build error
          VectorP Level 4

          Like so many forum participants, you have most likely used an old template for that config.

          You must have missed the Blog posts for more than 15 months, now.


          Here is some feedback:


          1. You have:

          <preference name="AutoHideSplashScreen" value="false" />

          <preference name="SplashScreenDelay" value="2000" />

          ...which is not logical. You are saying: "Don't hide my splash screen automatically, and please, do that after exactly 2 seconds".


          2. You are using ancient plugins from the obsolete pgb repo, for instance:

          <gap:plugin name="org.apache.cordova.camera" />

          You should use the latest versions of the plugins from npm. Be aware that they are named differently, in this case cordova-plugin-camera.


          3. You have included a whole bunch of plugins. Do you really need them all?

          If not, remove as many as possible.


          4. You have included assets for blackberry and webOS. Haven't you noticed that PGB doesn't build these platforms (and hasn't done so for at least 3 years now)?


          5. You have specified both landscape and portrait. However, you have only 1 landscape splashscreen specified. Also, many splash dimensions (especially for larger screens) are missing. You should include the missing splashes. (and icons, too)


          6. You have

          <plugin name="cordova-plugin-whitelist" version="1" />...but that version doesn't exist. Remove the version attribute.


          7.  You have

          <access origin="*"/>

          <access origin="*.pushwoosh.com"/>

          ...where the second line is redundant, given the first line.

          1 person found this helpful
          • 2. Re: Build error
            vangroover Adobe Employee

            i think the important part of your post is this bit


            COMPILE OUTPUT


            ERROR: Invalid filename / directory found in package -




            1 person found this helpful
            • 3. Re: Build error
              javierv860545 Level 1

              Thank you very much for your help and time to both of you!!


              I have corrected my config.xml and changed the package name, the package name had a accent and that make the build error.


              Thanks !!