0
votes

I'm trying to add LocalFileSystem plugin into my project. But when i execute this command phonegap plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git from '../assets/www/' directory i get this error : JScript runtime error 800A1391 'window' is undefined

3

3 Answers

0
votes

I don't think you're in the right directory, you want to be in the root of your Cordova/PhoneGap application (where the config.xml is located). For you, it looks like it might be your /assets/ directory. Also, try this command:

cordova plugin add org.apache.cordova.file

Taken from: http://plugins.cordova.io/#/package/org.apache.cordova.file

0
votes

Try going to the main folder of your project (The highest level folder) and execute

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git

at the CLI. You also need to configure config.xml and AndroidManifest.xml according to the docs: Phonegap Docs

See phonegap-android-localfilesystem-is-not-defined

0
votes

I was using phonegap 3.0. I updated phonegap to latest version 3.4 and that solved my problem. The .cordova folder was not present in my project directory.