title: Ionic mobile development; Error when preparing android in Ionic
body: <p>I am getting an error when I add android platform and prepare android.</p>
  <p>When I run the following command :-</p>
  <pre><code> ionic capacitor add android
  </code></pre>
  <p>I get following error:-</p>
  <blockquote>
  <p>[error] &quot;android&quot; platform already exists.
  To add a new &quot;android&quot; platform, please remove &quot;D:\ionic\myapp\android&quot;
  and run this command again.
  WARNING! your native IDE project will be completely removed. [ERROR] An error occurred while running subprocess capacitor.
  capacitor.cmd add android exited with exit code 1.</p>
  </blockquote>
  <p>I updated the android by using the following command:-</p>
  <pre><code>ionic capacitor update android
  </code></pre>
  <p>It updated my android : -</p>
  <blockquote>
  <p>capacitor.cmd update android  √ Updating Android plugins in 73.77ms<br />
  Found 0 Capacitor plugins for android:  √ update android in 473.61ms
  Update finished in 0.593s</p>
  </blockquote>
  <p>Then I tried to prepare the android to start in Android studio :-</p>
  <pre><code>ionic cordova prepare android
  </code></pre>
  <p>I got the following error:-</p>
  <blockquote>
  <p>cordova.cmd platform add android --save Error: npm: Command failed with exit code 1 Error output: npm ERR! code ENOLOCAL npm ERR! Could
  not install from &quot;android&quot; as it does not contain a package.json file.</p>
  <p>npm ERR! A complete log of this run can be found in: npm ERR!<br />
  C:\Users\USER\AppData\Roaming\npm-cache_logs\2020-08-14T09_02_55_668Z-debug.log
  at ChildProcess.whenDone (C:\Users\USER\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:135:23)
  at ChildProcess.emit (events.js:223:5)
  at ChildProcess.cp.emit (C:\Users\USER\AppData\Roaming\npm\node_modules\cordova\node_modules\cross-spawn\lib\enoent.js:34:29)
  at maybeClose (internal/child_process.js:1021:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {   stderr: 'npm ERR! code
  ENOLOCAL\n' +
  'npm ERR! Could not install from &quot;android&quot; as it does not contain a package.json file.\n' +
  '\n' +
  'npm ERR! A complete log of this run can be found in:\n' +
  'npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2020-08-14T09_02_55_668Z-debug.log\n',
  code: 1 } [ERROR] An error occurred while running subprocess cordova.
  cordova.cmd platform add android --save exited with exit code 1.
  Re-running this command with the --verbose flag may provide more information.</p>
  </blockquote>
  <p>I tried to remove cordova and install again. But it is not working.</p>
  <p>Have I missed any plugin. I have added the capacitor in the beginning of the project.</p>
  <p>Could anyone please suggest any solution ?</p>