I am using
phonegap-2.9.0 with file plugin. When I build project for android platform it creates two packages within the
I get below errors within these two packages:
Method testSaveLocationExists() from the type DirectoryManager is not visible Method getFreeDiskSpace() from the type DirectoryManager is not visible Method testFileExists() from the type DirectoryManager is not visible
import org.apache.cordova.CordovaResourceApi unresolved import org.apache.cordova.CordovaResourceApi.OpenForReadResult unresolved
Could someone please tell me what I should do to resolve these?
You have two problems.
1) Version of Phonegap is outdated
2) The way to install a plugin is:
-> phonegap plugin add “urlofplugin” or “/path””
-> phonegap platform add android
-> phonegap prepare
-> phonegap build
sometimes the plugin has a different default installation, the files need to change the platform.
Well, I dont know if I can help you, but I had similar problems. When I installed exactly those two plugins I got an error too. A different one, which I dont perticularly remember, something to do with a missing file that I can easily find in the file manager. Anyway, what helped me was:
- I updated to a more recent version, if you are able to I advice for it.
- After installing the plugins through cordova cmd api (.nodejs command prompt … you know what I mean) I was forgetting to build in the api itself. It sounds stupid but I was using wp8 and thus using a template for visual studio. The studio gave me the error, the building process (in cmd) also gave errors, but it was fixed by updating to the newer version.
You need to configure you build path and then add library from external source and select the library then it will resolve or u can make copy and paste cordova library .jar file in your lib folder. then it will remove, if not happen then tell me …….
I am not sure if that will work but first uninstall these plugins using phonegap/cordova CLI and than reinstall it in the root of application folder using the CLI only like this:
phonegap local plugin add <required plugin>
This worked for me after reinstallation.