RC1 Issue: Content in assets folder not copied in Device run


#1

When doing ionic run android and the assets folder is not getting copied to device.
In my case i have translation-files for ng2-translate in src/assets/i18n

When I do ionic serve, it all works well in browser, but not happening with Device.

Screenshot of

  1. Resources tab of Chrome Dev tools
  2. www/assets that is copied right from src

I followed this link https://github.com/driftyco/ionic-app-scripts/issues/176
and did npm install @ionic/app-scripts@beta

My Ionic info

Cordova CLI: 6.3.0
Gulp version:  CLI version 3.9.1
Gulp local:  
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.36
ios-deploy version: Not installed
ios-sim version: 5.0.6 
OS: Mac OS X El Capitan
Node Version: v4.2.6
Xcode version: Xcode 8.0 Build version 8A218a

#2

I had the same issue.

Setting path for assets with dot (.) did the trick: (http, ‘./assets/i18n’, ‘.json’);


#3

Not working for me in both RC1, RC2, in device. It’s working in browser.

It an open issue @ https://github.com/driftyco/ionic-app-scripts/issues/176


#4

Have you tried to update app-scripts to 0.0.39?


#5

Yes. Upgraded to RC2 which has app-script version 0.0.39.
But same problem!

I just noticed 0.0.41 in changelog of ionic-app-scripts
Will try with that tomorrow.


#6

I’m facing the same problem in Android. In browser the folder assets/i18n is deployed, but for the android device is not.

Does anyone know how to solve this problem?