[
https://issues.apache.org/jira/browse/CB-9999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033599#comment-15033599
]
Did commented on CB-9999:
-------------------------
I have the same issue using:
[email protected]
[email protected]
cordova -v
5.4.1
I can reproduce it with:
{code}
$ cordova create testprj
Creating a new cordova project.
$ cd testprj/
$ cordova platform add android
Adding android project...
Running command:
/home/davidfr/.cordova/lib/npm_cache/cordova-android/4.1.1/package/bin/create
/tmp/cordova/testprj/platforms/android io.cordova.hellocordova HelloCordova
--cli
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-22
Copying template files...
Android project created with [email protected]
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the
project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than
4.0. If you have a previous platform version, you do *not* need this plugin
since the whitelist will be built in.
$ cordova plugin add [email protected]
Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-file" for android
Plugin doesn't support this project's cordova-android version. cordova-android:
4.1.1, failed version requirement: >=5.0.0-dev
Skipping 'cordova-plugin-file' for android
{code}
In github the newest release of cordova-plugin-file is 4.0.0, but if you
install cordova-plugin-file without version number, then NPM resolved the
version to 3.0.0. I think there is some problem with NPM and GitHUB. The latest
branch name in GitHUB is 4.0.0 and the previous is r3.0.0. Is this some kind of
incompatibility?
> Cordova file plugin: error: package org.apache.cordova.file does not exist
> --------------------------------------------------------------------------
>
> Key: CB-9999
> URL: https://issues.apache.org/jira/browse/CB-9999
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File, Plugin File Transfer
> Environment: MacOS
> Reporter: romeo mihalcea
> Labels: Android
>
> After installing the `cordova-plugin-file` and trying to run the project I
> get this error in the console:
> {code:borderStyle=solid}
> .../local/cordova-build/platforms/android/src/org/apache/cordova/filetransfer/FileTransfer.java:59:
> error: package org.apache.cordova.file does not exist
> import org.apache.cordova.file.FileUtils;
> ^
> .../local/cordova-build/platforms/android/src/org/apache/cordova/filetransfer/FileTransfer.java:934:
> error: cannot find symbol
> FileUtils filePlugin = (FileUtils)
> pm.getPlugin("File");
> ^
> symbol: class FileUtils
> .../local/cordova-build/platforms/android/src/org/apache/cordova/filetransfer/FileTransfer.java:934:
> error: cannot find symbol
> FileUtils filePlugin = (FileUtils)
> pm.getPlugin("File");
> ^
> symbol: class FileUtils
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 3 errors
> :compileDebugJava FAILED
> FAILURE: Build failed with an exception.
> * What went wrong:
> Execution failed for task ':compileDebugJava'.
> > Compilation failed; see the compiler error output for details.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]