It seems cordova
caches compiled plugins, when i change the source code of plugins (.java
files on windows), the only way to force cordova to recompile the plugin is to remove and then add that plugin again, which is a pain .
Is there any way to clean cordova cache or force it to recompile added plugins ?
相关问题
- Should I use CSS3 media queries to deliver differe
- apk big size with ionic 4 build
- How to read file in android using PhoneGap Javascr
- Ionic start give error: There was an error with th
- InAppBrowser Allow-Navigation ONLY MY DOMAIN when
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Phonegap - Error - Keystore alias not recognized
- Can't use serve with Cordova / Phonegap hellow
- ionic - Copy/paste in input field in iOS 10 not wo
- PhoneGap iOS 7 and localStorage
- deviceready not firing in cordova
- net::ERR_CONNECTION_REFUSED ionic
- Phonegap - Missing App Store Icon 1024x1024px App
From cordova>=6.0 you can install and link your local plugin path to the project instead of copy it so it will recompile each time you build.
https://cordova.apache.org/docs/en/6.x/reference/cordova-cli/index.html#cordova-plugin-command
Not afaik, the only workaround I've found is to use a before_prepare script to remove and add the plugin every time you prepare the app:
000_RefreshPluginXXX.sh:
See here for details. Hope that sh file works under windows environment, otherwise you can do it with a
.bat
file.Beaware that this is going to remove, download and reinstall the specified plugins for every platform every time that you prepare your app (prepare occurs when you build/emulate/compile)
Afaik there's no way to recompile the original files.
The quickest and most dirty way (still the best for quick checks) is to change the files under
e.g. (Android)
platforms/android/src/YOUR_PACKAGE/FILE_TO_CHANGE
that way it's automatically recompiled.
Obviously this file can be easily deleted or overwritten so it's just a way to quickly test SMALL changes.