apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 209 forks source link

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

Open nghtstr opened 6 years ago

nghtstr commented 6 years ago

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:

Toolchain:

Platforms affected:

What the scope of your problem:

dkijkuit commented 6 years ago

Having the same issue here, any ideas?

iamjoyce commented 6 years ago

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 commented 6 years ago

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

Story5 commented 6 years ago

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 commented 6 years ago

Any news about this issue?

nkCreation commented 6 years ago

Hi. Any news of this ?

mapicard commented 6 years ago

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

jacobg commented 6 years ago

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

mapicard commented 6 years ago

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 commented 6 years ago

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

unstableair commented 6 years ago

@mapicard to install the patched version use:

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

fdambrosio commented 6 years ago

thanks @unstableair this works

virtualvishwam commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

thanks @jamescodesthings

gwynjudd commented 6 years ago

@jacobg please submit a PR for your fixes

borgogelli commented 6 years ago

Same problem for me

rejhgadellaabsl commented 6 years ago

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

mamzellejuu commented 5 years ago

+1 thanks @jacobg

theCrius commented 5 years ago

Issue is still there:

Ionic 3.9, cordova 7.1

had to use @jamescodesthings source to have it working

mayursofbang4 commented 3 years ago

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 commented 2 years ago

I have the same problem that you report @mayursofbang4