title: Phonegap PluginManager failed to load plugins/config.xml with --rename-manifest-package
body: <p>I use aapt's --rename-manifest-package to generate env specific packages.</p>
  
  <p><a href="https://stackoverflow.com/questions/3360349/custom-android-build-xml-for-rename-manifest-package">See this question</a></p>
  
  <p>the package names
  in prod, I use</p>
  
  <pre><code>com.xxx.app
  </code></pre>
  
  <p>for uat env, I use </p>
  
  <pre><code>com.xxx.app.uat
  </code></pre>
  
  <p>it works fine until I added phonegap, I'm using codorva 2.2, it gives me below error</p>
  
  <pre><code>12-12 19:02:36.156: E/PluginManager(13188):     =====================================================================================
  12-12 19:02:36.156: E/PluginManager(13188): ERROR: plugin.xml is missing.  Add       res/xml/plugins.xml to your project.
  12-12 19:02:36.156: E/PluginManager(13188): https://git-wip-us.apache.org/repos/asf?     p=incubator-cordova-android.git;a=blob;f=framework/res/xml/plugins.xml  
  12-12 19:02:36.156: E/PluginManager(13188): =====================================================================================
  </code></pre>
  
  <p>I finally traced down to below code in PluginManager</p>
  
  <pre><code>int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getPackageName());
  ...
  XmlResourceParser xml = this.ctx.getActivity().getResources().getXml(id);
  </code></pre>
  
  <p>the id is 0 which means it failed to reference the config.xml
  getActivity().getPackgeName() gives replaced package name - "<strong>com.xxx.app.uat</strong>"</p>
  
  <p>it looks like .getResources().getIdentifer() was not updated to new package... could it be a bug from android?</p>
  
  <p>In my test case,
  if I use R.xml.config, it referenced config.xml without issues.</p>
  
  <p>the problem is I can't change PluginsManager which is a part of Phonegap codebase...</p>