Description:
I having a problem bulding my app after installing App Preferences plugin.
To corroborate, I created a new Tab project, it was builded successfully, but then, I installed that plugin and problems came back again.
Steps to Reproduce:
Output:
Building terminates with this error:
will push strings array {"name":"lang","titles":["English (US)","English (UK)"],"values":["en-us","en-gb"]}
unhandled exception { Error: ENOENT: no such file or directory, mkdir 'platforms/android/res/xml'
errno: -2,
code: 'ENOENT',
syscall: 'mkdir',
path: 'platforms/android/res/xml' }
(node:10363) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, mkdir 'platforms/android/res/xml'
(node:10363) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10363) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Same here. It occurs when executing ionic cordova platform add android.
Does this happen with Cordova 7?
In my case it is Cordova 7.0.0.
Me too
Other detail: when I execute ionic cordova plugin remove cordova-plugin-app-preferences this happens:
Settings.bundle is generated by external tool, skipping
unhandled exception { Error: ENOENT: no such file or directory, unlink 'platforms/android/res/xml/apppreferences.xml'
errno: -2,
code: 'ENOENT',
syscall: 'unlink',
path: 'platforms/android/res/xml/apppreferences.xml' }
(node:27274) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, unlink 'platforms/android/res/xml/apppreferences.xml'
(node:27274) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:27274) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Same happens with Background Geolocation plugin!
Any body found a solution, I get the same error.
In my case it is cordova 8.0.0
I have an old virtual machine with Cordova 6 and error doesn't happen. But I tried downgrading versions in this project and got the same error
@Genarito I tried this out a little while ago and was getting it, too. I apologize I haven't had time to dig further. I've been busy with Ionic CLI 4. If you find out more, please update the issue. Otherwise I'll try to find some time at a later date.
No problem! Thank you so much
Is there any update? We're seeing exactly the same error. Android build fails and so did removing app-preferences. I'm on cordova 8 and cordova android 7.1.0. Didn't see this problem before upgrade cordova android from 6.3.0 to 7.1.0
I have discovered that it's an already issue in the plugin's repo. As one user said on it, it can be fixed with:
cordova plugin add https://github.com/vash15/me.apla.cordova.app-preferences
Note: perhaps you need to increase the minSdk parameter at your config.xml file to "19" to get it working
^ keep in mind that's a forked version
a poor version for this cordova 7.0.0, the root cause is the /res folder disappear. so only way is to downgrade to version 6.3.0
@Genarito Thanks a lot.
You are awsome!!! +++++
Most helpful comment
I have discovered that it's an already issue in the plugin's repo. As one user said on it, it can be fixed with:
cordova plugin add https://github.com/vash15/me.apla.cordova.app-preferencesNote: perhaps you need to increase the minSdk parameter at your
config.xmlfile to "19" to get it working