cordova-plugin-crypt-file
cordova-plugin-crypt-file copied to clipboard
Live reload with Ionic
So I have been trying to run this plugin on some of my projects for work, this being heavily reliant on Ionic 2 and thereby typescript.
Basically I am finding when testing an app, I am having the following issue when trying to do a live reload with the below command:
ionic cordova run android --livereload
Only to have the call failed with creating a call to file:///android_asset/www/+++/http://192.168.0.6:8100.
The code isn't really important since this issue was experienced even with a new project doing the following:
- run command:
ionic start myApp sidemenu
- cd into the directory
- install the plugin with: ionic cordova plugin add cordova-plugin-crypt-file
- do a test run (in my case ran this on my android phone),
ionic cordova run android --livereload
- it will fail to run, and will call file:///android_asset/www/+++/http://192.168.0.6:8100 which is not a valid for a number of reasons.
I also have this same problem. For now I have only workaround: remove plugin before ionic run, and add before normal build.
i have the same problem
+1
+1
same here..
+1
I've fixed this by adding the following code to line 2 of plugins/cordova-plugin-cryptx-file/hooks/after_prepare.js
if (context.cmdLine.indexOf('cordova run') !== '-1') return;
Then just run your code with livereload:
ionic cordova run android -lc