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

Failed to install 'cordova-plugin-app-preferences': Error: ENOENT: no such file or directory #135

Open
6 of 17 tasks
nghtstr opened this issue Jan 26, 2018 · 22 comments
Open
6 of 17 tasks

Comments

@nghtstr
Copy link

nghtstr commented Jan 26, 2018

Issue: Every time I try to install this plugin, I keep getting these errors. Here is one snippet of what I keep on getting:

Plugin "cordova-plugin-app-preferences" already installed on android. Installing "cordova-plugin-app-preferences" for browser unhandled exception { Error: ENOENT: no such file or directory, open 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' errno: -2, code: 'ENOENT', syscall: 'open', path: 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' } Failed to install 'cordova-plugin-app-preferences': Error: ENOENT: no such file or directory, open 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' (node:8160) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' (node:8160) [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.

After deleting it manually, I try doing a clean install of it:

Installing "cordova-plugin-app-preferences" for android Android Studio project detected unhandled exception { Error: ENOENT: no such file or directory, open 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' errno: -2, code: 'ENOENT', syscall: 'open', path: 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' } Failed to install 'cordova-plugin-app-preferences': Error: ENOENT: no such file or directory, open 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' (node:8196) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open 'platforms/android/src/me/apla/cordova/AppPreferencesActivity.java' (node:8196) [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.

As you can see, there is no difference of when I try to install this, or reinstall this.


Please specify your environment

Plugin version:

  • released version: 0.99.3
  • repository master

Toolchain:

  • Cordova cli
  • Phonegap cli
  • Phonegap cloud
  • Ionic
  • Other: _____

Platforms affected:

  • Android
  • iOS/macOS
  • LocalStorage fallback for browser and blackberry
  • Windows and Windows Phone 8.1 and later
  • Windows Phone 8 and earlier (deprecated)

What the scope of your problem:

  • General functionality (store/fetch/remove/clearAll)
  • Suites
  • Cloud synchronization and events
  • Preferences pane generation and display
  • Installation
@dkijkuit
Copy link

dkijkuit commented Feb 1, 2018

Having the same issue here, any ideas?

@iamjoyce
Copy link

iamjoyce commented Feb 8, 2018

What is your cordova version? My initial suspicion is that the cordova version is 7.0.0 or 8.0.0 - The cordova version affected few other plugins as well. Downgrading should help.

@dkijkuit
Copy link

@iamjoyce yes version is indeed 7.0.0, I wasn't aware that these versions weren't supported yet.

@Story5
Copy link

Story5 commented Mar 12, 2018

I having the same issue,blow is my ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 7.0.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2 
    ios-sim           : 6.1.2 
    Node              : v8.9.4
    npm               : 5.6.0 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b 

Environment Variables:

    ANDROID_HOME : /Users/Story5/Library/Android/sdk

Misc:

    backend : pro

@fabiocaccamo
Copy link

Any news about this issue?

@nkCreation
Copy link

Hi. Any news of this ?

@mapicard
Copy link

Having the same issue here. How can we get an updated version of the plugin?

@jacobg
Copy link

jacobg commented Mar 27, 2018

The forked version at https://github.com/vash15/me.apla.cordova.app-preferences fixes the issue. Please merge it in.

@mapicard
Copy link

Thanks for the reply, but pretty much of a newbie here.
I know how to manage/merge my git but how do I "merge it in" ?
Do I just download and copy all the files from this fork ?
Do I install the plugin from this git-repo ?
Something else ?
Thanks again
mp

@jacobg
Copy link

jacobg commented Mar 27, 2018

:) I'm asking the owner of this repository to merge it in.

@unstableair
Copy link

unstableair commented Mar 28, 2018

@mapicard to install the patched version use:

cordova plugin add https://github.com/vash15/me.apla.cordova.app-preferences

@fdambrosio
Copy link

thanks @unstableair this works

@virtualvishwam
Copy link

@owner please patch this... Its been too long and I am just waiting for this plugin to work ( not able to migrate to Cordova 8.0.0).
@jacobg lemme try the patch... Thanks in advance...

@jamescodesthings
Copy link

jamescodesthings commented Jul 2, 2018

@jacobg Because of the reverse domain naming convention in the repository name plugman kept giving me 'Could not fetch from registry' errors. This caused trouble when installing from scratch on our CI server.

To fix this I've re-hosted your fork here: https://bitbucket.org/packt-internal/cordova-plugin-app-preferences/src/master/

With the same repo-name as the plugin name, that tends to work, if anyone has the same trouble when reinstalling platforms or running cordova prepare then use this hosted copy with:

cordova plugin add https://bitbucket.org/packt-internal/cordova-plugin-app-preferences.git

Thanks for sorting out Cordova 7+ support.

@fdambrosio
Copy link

thanks @jamescodesthings

@gwynjudd
Copy link

gwynjudd commented Aug 7, 2018

@jacobg please submit a PR for your fixes

@borgogelli
Copy link

Same problem for me

@rejhgadellaabsl
Copy link

+1 here. Is this project still maintained? I assume @jacobg did PR his fix?

@mamzellejuu
Copy link

+1 thanks @jacobg

@theCrius
Copy link

Issue is still there:

Ionic 3.9, cordova 7.1

had to use @jamescodesthings source to have it working

gabcvit added a commit to app-affairs-GmbH/me.apla.cordova.app-preferences that referenced this issue Aug 14, 2020
This solution was reported on issue: apla#135 . The solution was implemented in this branch: https://github.com/vash15/me.apla.cordova.app-preferences.
But as we need to have a solution which contains both cordova 9.0.0 compatibility AND a fix for this error. I'm mergin the two solutions into our own repository
@mayursofbang4
Copy link

I am able to open the app preferences in IOS via Cordova plugin add https://github.com/myieye/me.apla.cordova.app-preferences but not working in android. Can anyone have a solution for this issue?

We are getting an error while clicking on the app preference icon - Class me.apla.cordova.AppPreferencesActivity not found. Please run preference generator.

cordova plugin add https://github.com/myieye/me.apla.cordova.app-preferences

@josepoma
Copy link

josepoma commented Mar 2, 2022

I have the same problem that you report @mayursofbang4

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

No branches or pull requests