7 Replies Latest reply on Sep 30, 2016 12:07 AM by Enigmatry

    Android failed build but no reasons why in the log

    pauls17056365

      App ID:1878200

       

      This is failing an android build, but I can't see from the log file any reason why.

       

      Log:

      Build Date: 2016-09-27 12:14:08 +0000

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

      PLUGIN OUTPUT

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

      Notice: org.apache.cordova.battery-status has been automatically converted to cordova-plugin-battery-status and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-battery-status" via npm

      Installing "cordova-plugin-battery-status" at "1.2.0" for android

      Notice: org.apache.cordova.camera has been automatically converted to cordova-plugin-camera and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-camera" via npm

      Installing "cordova-plugin-camera" at "2.3.0" for android

      Fetching plugin "cordova-plugin-compat" via npm

      Installing "cordova-plugin-compat" at "1.0.0" for android

      Notice: org.apache.cordova.media-capture has been automatically converted to cordova-plugin-media-capture and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-media-capture" via npm

      Installing "cordova-plugin-media-capture" at "1.4.0" for android

      Fetching plugin "cordova-plugin-file" via npm

      Installing "cordova-plugin-file" at "4.3.0" for android

      Dependent plugin "cordova-plugin-compat" already installed on android.

       

      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.

       

        

      Dependent plugin "cordova-plugin-compat" already installed on android.

      Notice: org.apache.cordova.console has been automatically converted to cordova-plugin-console and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-console" via npm

      Installing "cordova-plugin-console" at "1.0.4" for android

      Notice: org.apache.cordova.contacts has been automatically converted to cordova-plugin-contacts and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-contacts" via npm

      Installing "cordova-plugin-contacts" at "2.2.0" for android

      Dependent plugin "cordova-plugin-compat" already installed on android.

      Notice: org.apache.cordova.device has been automatically converted to cordova-plugin-device and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-device" via npm

      Installing "cordova-plugin-device" at "1.1.3" for android

      Notice: org.apache.cordova.device-motion has been automatically converted to cordova-plugin-device-motion and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-device-motion" via npm

      Installing "cordova-plugin-device-motion" at "1.2.2" for android

      Notice: org.apache.cordova.device-orientation has been automatically converted to cordova-plugin-device-orientation and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-device-orientation" via npm

      Installing "cordova-plugin-device-orientation" at "1.0.4" for android

      Plugin with alternate id cordova-plugin-file is already fetched, so installing it instead of org.apache.cordova.file

      Plugin "cordova-plugin-file" already installed on android. Making it top-level.

      Notice: org.apache.cordova.file-transfer has been automatically converted to cordova-plugin-file-transfer and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-file-transfer" via npm

      Installing "cordova-plugin-file-transfer" at "1.6.0" for android

      Dependent plugin "cordova-plugin-file" already installed on android.

      Notice: org.apache.cordova.geolocation has been automatically converted to cordova-plugin-geolocation and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-geolocation" via npm

      Installing "cordova-plugin-geolocation" at "2.3.0" for android

      Dependent plugin "cordova-plugin-compat" already installed on android.

      Notice: org.apache.cordova.globalization has been automatically converted to cordova-plugin-globalization and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-globalization" via npm

      Installing "cordova-plugin-globalization" at "1.0.4" for android

      Notice: org.apache.cordova.inappbrowser has been automatically converted to cordova-plugin-inappbrowser and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-inappbrowser" via npm

      Installing "cordova-plugin-inappbrowser" at "1.5.0" for android

      Notice: org.apache.cordova.media has been automatically converted to cordova-plugin-media and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-media" via npm

      Installing "cordova-plugin-media" at "2.4.0" for android

      Dependent plugin "cordova-plugin-file" already installed on android.

      Dependent plugin "cordova-plugin-compat" already installed on android.

      Notice: org.apache.cordova.network-information has been automatically converted to cordova-plugin-network-information and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-network-information" via npm

      Installing "cordova-plugin-network-information" at "1.3.0" for android

      Notice: org.apache.cordova.dialogs has been automatically converted to cordova-plugin-dialogs and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-dialogs" via npm

      Installing "cordova-plugin-dialogs" at "1.3.0" for android

      Notice: org.apache.cordova.splashscreen has been automatically converted to cordova-plugin-splashscreen and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-splashscreen" via npm

      Installing "cordova-plugin-splashscreen" at "4.0.0" for android

      Notice: org.apache.cordova.vibration has been automatically converted to cordova-plugin-vibration and fetched from npm. This is due to our old plugins registry shutting down.

      Fetching plugin "cordova-plugin-vibration" via npm

      Installing "cordova-plugin-vibration" at "2.1.2" for android

        • 1. Re: Android failed build but no reasons why in the log
          VectorP Level 4

          1. You need to use the npm plugins, not the old ones from the pgb repo.

          2. Could you please post your config.xml?

          • 2. Re: Android failed build but no reasons why in the log
            pauls17056365 Level 1

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

            <widget id="org.xxx.yyy" version="1.5.0" xmlns:gap="http://phonegap.com/ns/1.0" xmlns="http://www.w3.org/ns/widgets" android-versionCode="7">

              <name>EC Assess</name>

              <description>

              </description>

              <gap:platform name="ios">

                <preference name="Orientation" value="portrait" />

              </gap:platform>

              <gap:platform name="android">

                <preference name="Orientation" value="portrait" />

              </gap:platform>

              <icon src="/icons/android/icon-192.png" gap:density="xxxhdpi" gap:platform="android" />

              <icon src="/icons/android/icon-144.png" gap:density="xxhdpi" gap:platform="android" />

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

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

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

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

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

              <icon src="/icons/ios/icon@2x.png" width="114" height="114" gap:platform="ios" />

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

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

              <icon src="/icons/ios/icon-60@2x.png" width="120" height="120" gap:platform="ios" />

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

              <icon src="/icons/ios/icon-76@2x.png" width="152" height="152" gap:platform="ios" />

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

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

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

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

              <gap:splash src="/icons/android/splash-xxhdpi.png" gap:density="xxhdpi" gap:platform="android" />

              <gap:splash src="/icons/android/splash-xxxhdpi.png" gap:density="xxxhdpi" gap:platform="android" />

              <gap:splash src="/icons/ios/Default@2x~iphone.png" width="640" height="960" gap:platform="ios" />

              <gap:splash src="/icons/ios/Default~iphone.png" width="320" height="480" gap:platform="ios" />

              <gap:splash src="/icons/ios/Default-568h@2x~iphone.png" width="640" height="1136" gap:platform="ios" />

              <gap:splash src="/icons/ios/splash-6.png" width="750" height="1334" gap:platform="ios" />

              <gap:splash src="/icons/ios/splash-6Plus.png" width="1242" height="2208" gap:platform="ios" />

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

              <gap:splash src="/icons/ios/splash-retinaX2.png" width="1536" height="2048" gap:platform="ios" />

              <access origin="http://www.xxx.org" />

              <access origin="https://www.xxx.org" />

              <!--  <access origin="debug.phonegap.com" />-->

              <allow-navigation href="http://xxx.org/*" />

              <allow-navigation href="https://xxx.org/*" />

              <content src="index.html" />

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

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

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

              <plugin name="org.apache.cordova.battery-status" />

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

              <plugin name="org.apache.cordova.media-capture" />

              <plugin name="org.apache.cordova.console" />

              <plugin name="org.apache.cordova.contacts" />

              <plugin name="org.apache.cordova.device" />

              <plugin name="org.apache.cordova.device-motion" />

              <plugin name="org.apache.cordova.device-orientation" />

              <plugin name="org.apache.cordova.file" />

              <plugin name="org.apache.cordova.file-transfer" />

              <plugin name="org.apache.cordova.geolocation" />

              <plugin name="org.apache.cordova.globalization" />

              <plugin name="org.apache.cordova.inappbrowser" />

              <plugin name="org.apache.cordova.media" />

              <plugin name="org.apache.cordova.network-information" />

              <plugin name="org.apache.cordova.dialogs" />

              <plugin name="org.apache.cordova.splashscreen" />

              <plugin name="org.apache.cordova.vibration" />

              <!--  <plugin name="cordova-plugin-whitelist" version="1.2.1" />-->

            </widget>

            • 3. Re: Android failed build but no reasons why in the log
              VectorP Level 4

              Several issues:

              1. android-versionCode is the name of a preference, not an attribute of the widget element.

              2. The description element can't have an empty value.

              3. The 'orientation' preference should be spelled without caps

              4. I would suggest you use the latest PGB version: cli-6.3.0

              5. You should use the latest versions of the plugins from npm. Be aware that they are named differently

              6. You commented the whitelist plugin, which means that your whitelist rules will not take effect.

               

              Also, I would suggest you use the syntax without the gap: namespace.

               

              Furthermore, build errors can be generated when you include files that should not be there in your assets, like androidManifes, info.plist, cordova.js or directories like /platforms, /hooks or /plugins.

               

              Finally: are you sure you need all those plugins? If not, remove whatever is not needed by your app.

              • 4. Re: Android failed build but no reasons why in the log
                pauls17056365 Level 1

                Firstly, many thanks for taking the time to help me with this. 

                 

                I believe I have made the changes that were needed but its still failing to build and not giving me any indications as to why.  Is there no way of getting the reason for a failed build.  Also, on the subject of the changes that you mention above, this app was building a month ago with the problematic config files.  There were a couple of minor cosmetic changes and now its stopped building.  If there is anything else you can think of to point me in the right direction on this I'd really appreciate it.

                 

                Thanks,

                 

                Paul

                • 5. Re: Android failed build but no reasons why in the log
                  VectorP Level 4

                  Is your zip file available online, somewhere?

                  If so, please post its url, so I (and other forum participants who are willing to help) can have a look.

                  • 6. Re: Android failed build but no reasons why in the log
                    Enigmatry

                    I seem to have a similar problem. The logfile just stops after the plugin output section, without any mention of an error, so I have no idea what is wrong.

                    If i try the same with a zipfile that used to work before, it's not building now anymore either. Other apps seem to be building ok.

                     

                    AppId: 2051767

                    • 7. Re: Android failed build but no reasons why in the log
                      Enigmatry Level 1

                      It guess it was some problem with phonegap. The same zip is building fine now.