Click here to Skip to main content
15,887,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
Hi I'm working on Ionic framework for mobile app development in Visual studio 2013.
In config.xml I could not able to add cordova file plugin, it shows couldn't able to download plugin., so I manually installed the Plugin from Git repository. The version of the plugin added is 4.2.0 and I added the following lines of code for file creation


    window.resolveLocalFileSystemURL(cordova.file.dataDirectory, function (dir) {
                    console.log("got main dir", dir);
                    dir.getFile("log.txt", { create: true }, function (file) {
                        console.log("got the file", file);
                        logOb = file;
                        writeLog("App started");
                    });
                });

But when I try to build the solution, it throws me "couldn't install cordova file plugin" and the build fails. So I downgraded the plugin version to 1.3.1, build succeeds, but it throws "cordova.file" as undefined. 


What I have tried:

Please help me resolve this issue or if you could recommend me a different method to get around this issue, that would be great!

Thanks for the answers
Posted
Updated 23-Aug-16 11:43am

1 solution

Start with this tutorial: Building Apache Cordova Apps with Visual Studio on Channel 9[^]

Some details how to install Cordova plugin, you'll find here: Installing Cordova Plugins in Visual Studio 2013 - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900