I had Ionic 3 working fine for several months, and last week updated to Ionic 4 to test it. My app is written with Ionic 3. Now, ionic cordova build android
doesn't update the build. Ionic serve works fine.
I'm able to run ionic cordova build android
as well as all other ionic commands with no errors, but when I run build, the build doesn't update. The only way to get it to update is to remove and re-add the platform. I've also made sure to uninstall the app from the emulator after it runs -- so it's not accessing an older version. In addition, in the /platforms/android
folder, none of the files were updated.
I've tried the following:
- Reinstalled npm/node (and with it ionic and cordova) through brew
- re-cloned git project
- reinstalled Android Studio
reinstalled Gradle (also through brew)
restarted the computer after doing all the above.
reset the PATH variables (below) and tried running the build with Ionic-cli 3.20.* and 4.0.5.
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.0.5 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
System:
Android SDK Tools : 26.1.1
NodeJS : v10.8.0 (/usr/local/Cellar/node/10.8.0/bin/node)
npm : 6.3.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Environment:
ANDROID_HOME : /Users/eli/Library/Android/sdk
Path (in ~/.bash_profile
):
export ANDROID_HOME=/Users/eli/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools
export PATH=${PATH}:$ANDROID_HOME/platform-tools
if you want to ionic 4, you can not convert from 3 to 4. system automaticly ask to you 'new version, do you want to upgrade ionic 4',but it can not upgrade your project. if you want upgrade your project from 3 to 4, first of all you have to create ionic 4 project and all copies to new project from ionic 3. if you want search some information , you can find ; https://moduscreate.com/blog/upgrading-an-ionic-3-application-to-ionic-4/
if you don't want upgrade your app , you can uninstall version 4 and re install version 3