9 Replies Latest reply on Jan 31, 2017 4:37 PM by vangroover

    Plugin not working

    BobAchgill

      Is this the correct way to use a 3rd party plugin... just add this line to to the config.xml.... anything else I need to do??

       

      <plugin name="cordova-plugin-tag-manager" version="1.0.1" source="npm"  />

        • 1. Re: Plugin not working
          Chris W. Griffith Adobe Community Professional

          That will include the plugin so that PhoneGap Build will include it. You still need to write the JavaScript code to use it's functionality.

          • 2. Re: Plugin not working
            BobAchgill Level 1

            The plugin tab on PGB says that "this application has no plugins" after running the build with this line in place in the config.xml...

            <plugin name="cordova-plugin-tag-manager" version="1.0.1" source="npm"  />

             

            I know that my Javascript in my html is working OK because when I do a build with the same html on Cordova CLI the plugin works.  I am wondering if I have to do something like "add" a plugin with PGB??  On Cordova CLI I do a "add" on the command line to add the plugin.  PGB does not seem to have a means to "add" a plugin other than using that line in the Config.xml.  Is my line above have the wrong syntax?  It must be because I do not see the plugin listed under my plugin tab on PGB.

            • 3. Re: Plugin not working
              VectorP Level 4

              You should:

              - check the build log to see if there's any information on why the plugin is not included

              - check if your config is found, read and  parsed at all

              - please mention it if you're using Hydration

              1 person found this helpful
              • 4. Re: Plugin not working
                BobAchgill Level 1

                Build Date: 2017-01-21 18:32:09 +0000

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

                PLUGIN OUTPUT

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

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

                COMPILE OUTPUT

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

                Configuration on demand is an incubating feature.

                Incremental java compilation is an incubating feature.

                :preBuild UP-TO-DATE

                :preDebugBuild UP-TO-DATE

                :checkDebugManifest

                :CordovaLib:preBuild UP-TO-DATE

                :CordovaLib:preDebugBuild UP-TO-DATE

                :CordovaLib:compileDebugNdk UP-TO-DATE

                :CordovaLib:compileLint

                :CordovaLib:copyDebugLint UP-TO-DATE

                :CordovaLib:mergeDebugProguardFiles

                :CordovaLib:packageDebugRenderscript UP-TO-DATE

                :CordovaLib:checkDebugManifest

                :CordovaLib:prepareDebugDependencies

                :CordovaLib:compileDebugRenderscript

                :CordovaLib:generateDebugResValues

                :CordovaLib:generateDebugResources

                :CordovaLib:packageDebugResources

                :CordovaLib:compileDebugAidl

                :CordovaLib:generateDebugBuildConfig

                :CordovaLib:mergeDebugShaders

                :CordovaLib:compileDebugShaders

                :CordovaLib:generateDebugAssets

                :CordovaLib:mergeDebugAssets

                :CordovaLib:processDebugManifest

                :CordovaLib:processDebugResources

                :CordovaLib:generateDebugSources

                :CordovaLib:incrementalDebugJavaCompilationSafeguard

                :CordovaLib:compileDebugJavaWithJavac

                :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

                Note: Some input files use or override a deprecated API.

                Note: Recompile with -Xlint:deprecation for details.

                :CordovaLib:processDebugJavaRes UP-TO-DATE

                :CordovaLib:transformResourcesWithMergeJavaResForDebug

                :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

                :CordovaLib:mergeDebugJniLibFolders

                :CordovaLib:transformNative_libsWithMergeJniLibsForDebug

                :CordovaLib:transformNative_libsWithSyncJniLibsForDebug

                :CordovaLib:bundleDebug

                :prepareProjectCordovaLibUnspecifiedDebugLibrary

                :prepareDebugDependencies

                :compileDebugAidl

                :compileDebugRenderscript

                :generateDebugBuildConfig

                :mergeDebugShaders

                :compileDebugShaders

                :generateDebugAssets

                :mergeDebugAssets

                :generateDebugResValues

                :generateDebugResources

                :mergeDebugResources

                :processDebugManifest

                :processDebugResources

                :generateDebugSources

                :incrementalDebugJavaCompilationSafeguard

                :compileDebugJavaWithJavac

                :compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

                :compileDebugNdk UP-TO-DATE

                :compileDebugSources

                :prePackageMarkerForDebug

                :transformClassesWithDexForDebug

                Merged dex #1 (86 defs/108.5KiB)

                Merged dex #2 (7 defs/2.5KiB)

                Result is 93 defs/131.3KiB. Took 0.0s

                :mergeDebugJniLibFolders

                :transformNative_libsWithMergeJniLibsForDebug

                :processDebugJavaRes UP-TO-DATE

                :transformResourcesWithMergeJavaResForDebug

                :validateDebugSigning

                :packageDebug

                :zipalignDebug

                :assembleDebug

                :cdvBuildDebug

                 

                BUILD SUCCESSFUL

                 

                Total time: 2.453 secs

                Built the following apk(s):

                /project/build/outputs/apk/project-debug.apk

                • 5. Re: Plugin not working
                  kerrishotts Adobe Community Professional

                  What does the structure of what you're sending to PGB look like?

                   

                  Also, the syntax you are using to include a plugin is incorrect. See Plugins | PhoneGap Docs

                   

                  In short, use the "spec" attribute to specify version numbers, not "version".

                   

                  (If you add the plugin using the CLI with the "--save" switch, you'll get the right syntax.)

                  • 6. Re: Plugin not working
                    BobAchgill Level 1

                    The is the log when the plugin does not work and the build fails for Android...

                     

                    Build Date: 2017-01-31 21:24:25 +0000

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

                    PLUGIN OUTPUT

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

                    Fetching plugin "cordova-plugin-whitelist@1.3.1" via npm

                    Installing "cordova-plugin-whitelist" at "1.3.1" for windows

                    "plugman.cmd install --platform windows --project /cygwin/tmp/gimlet/2460183/project --plugin com.jareddickson.cordova.tag-manager@~1.0.1": Fetching plugin "com.jareddickson.cordova.tag-manager@~1.0.1" via npm

                    Cannot find plugin.xml for plugin "package". Please try adding it again.

                     

                     

                    PluginError.jpg

                    • 7. Re: Plugin not working
                      vangroover Adobe Employee

                      yeah that plugin doesnt have a plugin.xml in it so it's not a valid cordova plugin.

                      • 8. Re: Plugin not working
                        BobAchgill Level 1

                        You say it does not have a plugin.xml ....

                        then what is this...???

                         

                        cordova-plugin-tag-manager/plugin.xml at master · kraihn/cordova-plugin-tag-manager · GitHub

                        • 9. Re: Plugin not working
                          vangroover Adobe Employee

                          you're installing from npm not github.  if you install com.jareddickson.cordova.tag-manager@~1.0.1 then you can see there is no plugin.xml