Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5481

When embedding the Cordova WebView in an Android application using packageNameSuffix in build.gradle breaks PluginManager

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: cordova-android
    • Labels:
      None
    • Environment:

      Android application that uses the Google-recommended gradle build system and embeds the Cordova WebView

      Description

      org.apache.cordova.PluginManager#loadPlugins() should use

      int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getPackageName());

      instead of

      int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getClass().getPackage().getName());

      in order to get the correct package name to find config.xml even if packageNameSuffix is used in build.gradle

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                agrieve Andrew Grieve
                Reporter:
                MSch Martin Schuerrer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified