Luro91 opened a new issue #306:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/306


   # Bug Report
   
   ## Problem
   The plugin is not working with Cordova Android 10 anymore because Whitelist 
was renamed to Allowlist.
   
   
   ### What is expected to happen?
   The plugin compiles.
   
   
   ### What does actually happen?
   Cannot find symbol errors occur:
   ```
   > Task :app:compileDebugJavaWithJavac FAILED
   
cordovaProjectFoler/platforms/android/app/src/main/java/org/apache/cordova/filetransfer/FileTransfer.java:48:
 error: cannot find symbol
   import org.apache.cordova.Whitelist;
                            ^
     symbol:   class Whitelist
     location: package org.apache.cordova
   
cordovaProjectFoler/platforms/android/app/src/main/java/org/apache/cordova/filetransfer/FileTransfer.java:691:
 error: cannot find symbol
                   Whitelist whitelist = (Whitelist)gwl.invoke(webView);
                   ^
     symbol:   class Whitelist
     location: class org.apache.cordova.filetransfer.FileTransfer
   
cordovaProjectFoler/platforms/android/app/src/main/java/org/apache/cordova/filetransfer/FileTransfer.java:691:
 error: cannot find symbol
                   Whitelist whitelist = (Whitelist)gwl.invoke(webView);
                                          ^
     symbol:   class Whitelist
     location: class org.apache.cordova.filetransfer.FileTransfer
   ```
   
   
   ## Information
   The reference to Whitelist can not be found here anymore 
[here](https://github.com/apache/cordova-plugin-file-transfer/blob/master/src/android/FileTransfer.java#L48):
  because Whitelist was renamed to Allowlist here: 
https://github.com/apache/cordova-android/pull/1138
   
   I suggest to remove the code that exists for Cordova 3.x and 4.x as these 
are quite old versions. I am happy to create a pull request for this 
(https://github.com/Luro91/cordova-plugin-file-transfer/commit/9db03f76d19199d1fae9c185acad7bd8b43532bf).
 Should a minimum version for Cordova Android be specified for the plugin in 
this case?
   
   
   ### Command or Code
   `cordova build android`
   
   
   ### Environment, Platform, Device
   Build machine: MacBook Pro, Mac OS Big Sur Version 11.4
   
   
   ### Version information
   Cordova CLI: 10.0.0
   Cordova Android 10.0.0
   <plugin name="cordova-plugin-file-transfer" 
spec="https://github.com/apache/cordova-plugin-file-transfer#648b57792f2f33ffc9da6d2fa020d26a48799048";
 />
   
   
   ## Checklist
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to