Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CordovaResourceApi import unresolved phonegap

I am using phonegap-2.9.0 with file plugin. When I build project for android platform it creates two packages within the src/ folder:

org.apache.cordova.file
org.apache.cordova.filetransfer

I get below errors within these two packages:

1 - org.apache.cordova.file.FileUtils

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

2 - org.apache.cordova.filetransfer.FileTransfer

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?

Thanks.

like image 530
himsag Avatar asked Aug 20 '13 19:08

himsag


1 Answers

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.

like image 179
Moisés Pereira Avatar answered Nov 16 '22 03:11

Moisés Pereira