Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOENT for platforms/android/res/xml on building app for android with App Preferences plugin installed #3014

Closed
Genarito opened this issue Mar 14, 2018 · 16 comments

Comments

@Genarito
Copy link

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:

  1. ionic start beautiful_error
  2. cd beautiful_error
  3. ionic cordova plugin add cordova-plugin-app-preferences
  4. npm install --save @ ionic-native/app-preferences
  5. ionic cordova build android

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.

@Genarito Genarito changed the title ENOENT for platforms/android/res/xml on build app for android with App Preferences plugin installed ENOENT for platforms/android/res/xml on building app for android with App Preferences plugin installed Mar 14, 2018
@BenjaminGlusa
Copy link

Same here. It occurs when executing ionic cordova platform add android.

@imhoffd
Copy link
Contributor

imhoffd commented Mar 21, 2018

Does this happen with Cordova 7?

@BenjaminGlusa
Copy link

In my case it is Cordova 7.0.0.

@Genarito
Copy link
Author

Genarito commented Mar 21, 2018 via email

@Genarito
Copy link
Author

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.

@Genarito
Copy link
Author

Same happens with Background Geolocation plugin!

@ichinnasamy
Copy link

Any body found a solution, I get the same error.

@ichinnasamy
Copy link

In my case it is cordova 8.0.0

@Genarito
Copy link
Author

Genarito commented Apr 2, 2018

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

@imhoffd
Copy link
Contributor

imhoffd commented Apr 2, 2018

@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.

@Genarito
Copy link
Author

Genarito commented Apr 2, 2018

No problem! Thank you so much

@jqzhao
Copy link

jqzhao commented May 24, 2018

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

@Genarito
Copy link
Author

Genarito commented Jun 4, 2018

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

@Genarito Genarito closed this as completed Jun 4, 2018
@imhoffd
Copy link
Contributor

imhoffd commented Jun 4, 2018

^ keep in mind that's a forked version

@looiwailung
Copy link

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

@Edison4mobile
Copy link

@Genarito Thanks a lot.
You are awsome!!! +++++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants