Can't start Android app after updating to beta.4

I just upgraded my project to beta.4 and I faced the same problem. It turned out that I missed one update in the index.html (which I found out thanks to this post). Here are the updates that you need to perform in order to upgrade to beta.4:

  1. Update the Ionic CLI to the latest version:
npm install -g ionic@beta
  1. Copy the appropriate gulpfile.js to your project (for TS or for JS).

  2. Update your package.json using the one in ionic2-base-app as reference (for TS or for JS).

  3. Add angular2-polyfill.js before app.bundle.js in the index.html file:

<!-- Zone.js and Reflect-metadata  -->
<script src="build/js/angular2-polyfills.js"></script>
<!-- the bundle which is built from the app's source code -->
<script src="build/js/app.bundle.js"></script>
  1. Import es6-shim in app.ts/app.js, i.e. add the following line at the top:
import 'es6-shim';
  1. Remove the following files: ionic.config.js, ionic.project and webpack.config.js.

  2. Create a ionic.config.json file using this one as a reference and update it accordingly.

  3. From inside of your project’s folder run npm install to install the new packages.

  4. If you’re using a release of Ionic framework older than beta.3 in your project you also need to change the imports in all .ts/.js files from ionic-framework to ionic-angular.

NOTE: Depending on the version of the Ionic-CLI that you were using when you created your project some of the steps might be not needed (i.e. already completed).


EDIT: [2016-04-11] Added 2 additional steps suggested by @beachy.

11 Likes