0

I downloaded TACO, Created a new Ionic 2 RC project, did not change anything, clicked Play (F5).

Then this error appears:

Error       Platform android already added. 

What can be done to solve this?

Output from Build:

1>------ Build started: Project: ionic2-ts-blank1, Configuration: Debug Android ------
1>  ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac
1>  ------ Name from source package.json: vs-tac
1>  ------ Version from source package.json: 1.0.42
1>  ------ Package already installed globally at correct version.
1>  ------ Cordova tools 6.3.1 already installed.
1>  ------ Build Settings:
1>  ------ Build Settings:
1>  ------    platformConfigurationBldDir: c:\temp\ionic2-ts-blank1\ionic2-ts-blank1\bld\Android\Debug
1>  ------    platformConfigurationBinDir: c:\temp\ionic2-ts-blank1\ionic2-ts-blank1\bin\Android\Debug
1>  ------    buildCommand: prepare
1>  ------    platform: Android
1>  ------    cordovaPlatform: android
1>  ------    configuration: Debug
1>  ------    cordovaConfiguration: Debug
1>  ------    projectName: ionic2-ts-blank1
1>  ------    projectSourceDir: c:\temp\ionic2-ts-blank1\ionic2-ts-blank1
1>  ------    npmInstallDir: C:\Users\Tony\AppData\Roaming\npm
1>  ------    language: en-US
1>  ------ Adding platform: android
1>  No scripts found for hook "before_platform_add".
1>  No version supplied. Retrieving version from config.xml...
1>MSBUILD : cordova-build error : Platform android already added.
1>  Platform android already added.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
Tony
  • 16,527
  • 15
  • 80
  • 134
  • Sometimes with issues like this, its helpful to do a ionic platform remove -android and then re-add it. You might also delete your .tmp folder and the node_modules folder and run npm install again. Might help solve your issue. Good luck! – Caleb Swank Jan 18 '17 at 00:01
  • Any luck @Tony ? Did you get solution – Sunny_Sid May 10 '17 at 10:16
  • I did not try anymore, I don´t know if the problem persists. – Tony May 10 '17 at 12:52

1 Answers1

1

make sure you aren't in a directory that already contains an ionic app, this can happen.

Noalani
  • 31
  • 5