I recently updated the application for cordova from version 2.9 to version 3.5. I added the necessary plugins via the command line and made a cordless build of my application. I get a Nullpointer exception when reading / writing a file through a plugin. The following is a stack trace:
07-08 18:58:40.750: W/System.err(6670): java.lang.NullPointerException
07-08 18:58:40.750: W/System.err(6670): at org.apache.cordova.file.LocalFilesystem.filesystemPathForURL(LocalFilesystem.java:67)
07-08 18:58:40.750: W/System.err(6670): at org.apache.cordova.file.LocalFilesystem.getFileForLocalURL(LocalFilesystem.java:189)
07-08 18:58:40.750: W/System.err(6670): at org.apache.cordova.file.FileUtils.getFile(FileUtils.java:749)
07-08 18:58:40.760: W/System.err(6670): at org.apache.cordova.file.FileUtils.access$5(FileUtils.java:742)
07-08 18:58:40.760: W/System.err(6670): at org.apache.cordova.file.FileUtils$16.run(FileUtils.java:397)
07-08 18:58:40.760: W/System.err(6670): at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:525)
07-08 18:58:40.760: W/System.err(6670): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
07-08 18:58:40.760: W/System.err(6670): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
07-08 18:58:40.760: W/System.err(6670): at java.lang.Thread.run(Thread.java:856)
I need immediate help here.
Nullpointer exception thrown but need help accessing files
I would like to know what the URL pattern should be for accessing the file from a private application. In cordova 2.9 I referred to it as /data/data/com.myapp.android/abc.txtwith Javascript. Can I find out which URL format is now in cordova 3.5?
source
share