Every time I run ionic cordova build android
and then ionic cordova emulate android
, I get a version my app from maybe a month ago. Here's what I've tried:
- I've deleted files including deleting them from
/platforms/android
to no effect. - I've tried updating my version number in my config.xml file.
- I've tried deleting the APK and various other files from
/build/android
- I tried creating a new ionic app with
ionic start
and then after cding into the new directory for my new project and running the same two commands, I got the old version of my other app. - I've tried removing and then adding back cordova android with both the commands
ionic cordova rm/add platform android
andcordova rm/add platform android
and these cause some bizarre responses. With the ionic prefix, the remove command works fine but on add, I get this:
...
C:\Users\max\Documents\omsLibrary>ionic cordova platform add android
cordova platform add android --save
√ Running command - done!
ionic cordova resources android --force
√ Collecting resource configuration and source images - done!
Platform android not detected. Would you like to install it? (Y/n)
Update: after globally installing cordova, I no longer get the above on add. I just get this:
cordova platform add android --save
× Running command - failed!
[WARN] Platform already added. Saving platforms to config.xml.
> cordova platform save
√ Running command - done!
[ERROR] No platforms detected. Please run: ionic cordova platform add
I can keep doing this forever if I want but it will keep giving me the same circular instructions.
I have no problems at all with ionic serve
.
Here is what I get from ionic info
(updated after following Suraj Rao's suggestion):
cli packages: (C:\Users\max\Documents\omsLibrary\node_modules)
@ionic/cli-utils : 1.13.1
ionic (Ionic CLI) : 3.13.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.7.1
System:
Android SDK Tools : 26.1.1
Node : v6.9.2
npm : 5.4.2
OS : Windows 10
Misc:
backend : pro
Here's what I get from the cordova ls
command:
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-inapppurchase 1.1.0 "In App Purchase"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
What is the deal here? Do I just wipe and reinstall everything related to ionic and cordova? Thanks to anyone who can provide assistance!
cordova platform add android --save × Running command - failed!
?ionic cordova platform rm android --save
and then doionic cordova platform add android --save