Closed mohitmayank closed 8 years ago
There are even similiar errors during operations on unrelated plugins — any plugin:
> cordova plugin rm cordova-plugin-vibration
Error: ENOENT, unlink 'D:\Projects\Mobile\cordova\<appname>\source\platforms\android\res\xml\apppreferences.xml'
↑ that plugin remains installed in every platform.
These issues are bad, nearly every type of cordova operation seems to be broken or get aborted mid-way through without unrolling because of errors that trace back to app-preferences. Even if I start a new project fresh and get to a point where I can get these files to exist, the project has already been borked by things being half installed in unobvious ways (json files not updated etc). Infact, if your project is already set up then nothing seems wrong, it's only when you try to get it building on a new machine etc.
I thought I could work around it - just be careful and find a working order to add platforms and plugins, but after 3 days of whacking moles caused by one plugin, I think the options are:
app-settings.json
instead of crashing cordova silently, because the error message app-preferences throws never reaches the console — I had to step through a cordova building operation with a debugger to find why builds stopped working.
cordova build
operations abort early with "undefined", it means you haven't updated your app-settings.json
to the format introduced by 0.6.3 (ddd8676c92c9bdd1d17fb1b0ea333961b9dd3d18)(I'm going to try switching to localStorage as I can't spend any more time on this, but I know that's not a helpful suggestion)
@mohitmayank @Treer latest version should work
facing a small issue cause after https://github.com/apla/me.apla.cordova.app-preferences/pull/50 if i remove and re-add android platform getting following error -
perhaps moving the hook to before_build might help?
I don't add platform directory to version control. I also do customization on plugins and sometimes need to reset platform directory.