3 Replies Latest reply on Sep 14, 2018 4:56 AM by madhavArvind

    Why moodle 3.4 app fails to build on phonegap


      I have a Windows 10, Lenovo i7 laptop and Chrome browser.

      Using moodle 3.4.2 code from GitHub, and Adobe PhoneGap,

      I used to build my customised moodle mobile app for Android.

      It does not build anymore.

      I see the following error:

      Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: Notification.java - You can fix this here


      Can anyone help?

      Thanks for the help in anticipation.


        • 1. Re: Why moodle 3.4 app fails to build on phonegap
          Chris W. Griffith Adobe Community Professional

          Plugin versions are defined in the config.xml file. Edit it to set the versions that you want to use. See the config.xml documentation on the PhoneGap web site.


          Good Luck



          • 2. Re: Why moodle 3.4 app fails to build on phonegap
            madhavArvind Level 1

            Thanks Chris.


            I edited config.xml and specified all latest builds as mentioned on Plugin Search - Apache Cordova as well as updated the phone-gap version preference to 8.0.0 (<preference name="phonegap-version" value="cli-8.0.0" />)

            The hope was that compilation will go through.


            Alas, I still see the same error.


            Much appreciate further guidance.

            My fork is here on github if you would like to see:

            Yash-NIOS-April2018/config.xml at master · MadhavArvind/Yash-NIOS-April2018 · GitHub


            Thank you in anticipation!


            • 3. Re: Why moodle 3.4 app fails to build on phonegap
              madhavArvind Level 1

              Google search on "cordova plugins that include Notification.java" reveals "cordova-plugin-local-notifications" uses notifications.java


              However my config.xml does not specify this plugin. It specifies cordova-plugin-local-notifications-mm instead.


              For your convenience,

              Following is the plugin section of my config.xml:


                  <gap:plugin name="cordova-plugin-camera" source="npm" version="4.0.3" />

                  <gap:plugin name="cordova-plugin-media-capture" source="npm" version="3.0.2">

                      <param name="CAMERA_USAGE_DESCRIPTION" value="We'd like to access your camera to let you take a photo"/>

                      <param name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="We'd like to access your photo library to let you pick a photo"/>

                      <param name="MICROPHONE_USAGE_DESCRIPTION" value="We'd like to access your microphone to let you record an audio"/>


                  <gap:plugin name="cordova-plugin-device" source="npm" version="2.0.2" />

                  <gap:plugin name="cordova-plugin-file" source="npm" version="6.0.1" />

                  <gap:plugin name="cordova-plugin-file-transfer" source="npm" version="1.7.1" />

                  <gap:plugin name="cordova-plugin-globalization" source="npm" version="1.11.0" />

                  <gap:plugin name="cordova-plugin-inappbrowser" source="npm" version="3.0.0" />

                  <gap:plugin name="cordova-plugin-network-information" source="npm" version="2.0.1" />

                  <gap:plugin name="cordova-plugin-statusbar" source="npm" version="2.4.2" />

                  <gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.3.3" />

                  <gap:plugin name="cordova-plugin-splashscreen" source="npm" version="5.0.2" />

                  <gap:plugin name="cordova-universal-clipboard" source="npm" version="0.1.0" />

                  <gap:plugin name="nl.kingsquare.cordova.background-audio" source="npm" version="1.0.1" />



                  <gap:plugin name="phonegap-plugin-push" source="npm" version="2.2.3">

                      <param name="SENDER_ID" value="694767596569" />


                  <gap:plugin name="cordova-plugin-customurlscheme" source="npm" version="4.3.0">

                      <param name="URL_SCHEME" value="moodlemobile" />


                  <gap:plugin name="ionic-plugin-keyboard" source="npm" version="2.2.1" />

                  <gap:plugin name="cordova-plugin-zip" source="npm" version="3.1.0" />

                  <gap:plugin name="cordova-plugin-local-notifications-mm" source="npm" version="1.0.13"/>

                  <gap:plugin name="net.tunts.webintent" spec="https://github.com/Tunts/WebIntent.git" source="git" />

                  <gap:plugin name="ch.ti8m.documenthandler" spec="https://github.com/ti8m/DocumentHandler.git" source="git" />


              Once again, thanks for your help and support.