Platform-adding error after updating to rc0


I’m currently in the process of updating my app from beta7 (yeah, it’s been that long) to rc0. Actually, I’m done changing everything according to the changelog (following the steps of each version change … beta8 through 11 and then rc0). I had to change major parts of my app due to the export of Storage/SQLite which was a two-day long pain in the youknowwhat.

Now I’m at the point where everything should be up to date. When I do ionic run android with the latest ionic CLI etc installed, it shows this:

D:\ionic2\myApp>ionic run android

Running 'run:before' npm script before run
> ionic-hello-world@ build D:\ionic2\myApp
> ionic-app-scripts build
[16:22:50]  ionic-app-scripts 0.0.30
[16:22:50]  build prod started ...
[16:22:50]  clean started ...
[16:22:50]  clean finished in 15 ms
[16:22:50]  copy started ...
[16:22:50]  ngc started ...
[16:22:50]  lint started ...
[16:22:50]  copy finished in 211 ms
[16:22:52]  lint finished in 1.70 s
[16:23:14]  ngc finished in 23.83 s
[16:23:14]  bundle prod started ...
[16:23:23]  bundle prod finished in 9.16 s
[16:23:23]  sass started ...
[16:23:25]  sass finished in 1.64 s
[16:23:25]  minify started ...
[16:23:25]  cleancss started ...
[16:23:25]  uglifyjs started ...
[16:23:37]  uglifyjs finished in 12.00 s
[16:23:37]  cleancss finished in 12.00 s
[16:23:37]  minify finished in 12.01 s
[16:23:37]  build prod finished in 46.66 s
• You're trying to build for android but don't have the platform installed yet.
? Installing android for you.
 Error: Command failed: cordova platform add android
Error: Platform android already added.

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Which is weird, because the platform Android had been added to the project way before.

To see if there is something wrong with my setup, I’ve tested the Hello World and it worked perfectly fine.

Where does this error come from?

Can you provide the out put from the following

ionic -v

npm -v

node -v

ionic platform ls 

ionic plugin ls


ionic -v


npm -v


node -v


ionic platform ls

Installed platforms:
  android 5.1.1
Available platforms:
  amazon-fireos ~3.6.3 (deprecated)
  blackberry10 ~3.8.0
  browser ~4.1.0
  firefoxos ~3.6.3
  webos ~3.7.0
  windows ~4.3.1
  wp8 ~3.8.2 (deprecated)

ionic plugin ls:

cordova-plugin-background-mode 0.6.6-dev "BackgroundMode"
cordova-plugin-camera 2.3.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.4 "Console"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-file 4.3.0 "File"
cordova-plugin-file-transfer 1.6.0 "File Transfer"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

In the meantime, I started a new Ionic2 Project (RC1) and copied the files of my app over one by one and altered the code accordingly. This time, the app works. But don’t ask me what is different :smiley: