Royken
January 22, 2018, 3:11pm
1
Hello,
When I add android platform in by ionic project, (ionic cordova platform add android), it creates a platform forlder but not in the project’s folder.
In the image below i try to add patform then list folder in working directory. Platform is not present
I finally noticed that it creates the platform folder in another folder (don’t how and why)
Ionic infos
cli packages: (/usr/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.6
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v9.3.0
npm : 5.5.1
OS : Linux 4.4
Environment Variables:
ANDROID_HOME : /home/royken/Android/Sdk
Misc:
backend : pro
1 Like
What folder?
Any sym link stuff going on here maybe?
Royken
January 22, 2018, 4:04pm
3
@Sujan12 It creates it in Programmes folder (~/Programmes). It is a simple folder where I put my projects, with no special configuration.
Sujan12
January 23, 2018, 10:54am
4
Does the same happen when you create a new project with ionic start?
Royken
January 23, 2018, 12:47pm
5
@Sujan12 yes. When i create a new project (ionic start myApp sidemenu) and try to add a platform ionic cordova platform add android it says :
Using cordova-fetch for cordova-android@6.3.0
Error: Platform android already added.
[ERROR] Exception:
1 Like
Run ionic cordova platform add android --verbose. Output?
Try cordova platform add android. Output?
You might also want to try to upgrade your Cordova CLI to 8.0.0.
Maybe downgrading Node to the LTS will also help.
Royken
January 23, 2018, 1:33pm
7
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/home/royken/Programmes/Ionic/Ionic3/myapp', local: false, binPath:
'/usr/lib/node_modules/ionic/bin/ionic', libPath: '/usr/lib/node_modules/ionic/dist/index.js' }
[DEBUG] Daemon found (pid: 9576)
> cordova platform add android --save
Using cordova-fetch for cordova-android@~6.3.0
Error: Platform android already added.
[ERROR] Exception:
I had a similar issue which was solved by creating the “platforms” folder by hand. Then, the “ionic cordova platform add android” added everything correctly.
1 Like