title: Change Cordova project android package name
body: <p>Does any of you know how to change the package name of an android project build with cordova? </p>
  
  <p>I've tried to change the android project name by doing: </p>
  
  <ol>
  <li><p>Removing the android platform from the project by executing <code>cordova platform remove android</code> </p></li>
  <li><p>I changed the <code>&lt;widget id&gt;</code> in <strong>config.xml</strong>:</p></li>
  </ol>
  
  <p>From </p>
  
  <pre><code>&lt;widget id="com.oldName.oldName" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
  </code></pre>
  
  <p>to </p>
  
  <pre><code>&lt;widget id="com.newName.newName" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
  </code></pre>
  
  <ol start="3">
  <li>Reinstall android platform by doing <code>cordova platform add android</code></li>
  </ol>
  
  <p>&nbsp;</p>
  
  <p>Problem is that after I did it, I got an error when executing <code>cordova run android</code>:</p>
  
  <pre><code>(node:xxxxx) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'manifest' of undefined
  </code></pre>
  
  <p><strong><em>The only way to get rid of this error is to revert back to its original package name (and of course to re-install android platform)</em></strong></p>
  
  <p>I tried to google a lot but I just can't seem to find any solution that works for me. Will any of you be kind enough to enlighten me on this? </p>