florianmonfort opened a new issue #539: Build fails with 
android.support.v4.content
URL: https://github.com/apache/cordova-plugin-camera/issues/539
 
 
   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   Android should build successfully
   
   ### What does actually happen?
   
   Build fails.
   
   ## Information
   
   
   Hi,
   
   I have a project that was running without AndroidX before so it could be 
compiled, but now to target higher API levels we need to use androidx. So to 
solve this issue we have installed the following plugins:
   
   cordova-plugin-androidx
   cordova-plugin-androidx-adapter
   
   However during build time we still get the following error, including from 
camera cordova plugin:
   
   `
   > Task :app:processDebugResources
   
   > Task :app:compileDebugJavaWithJavac FAILED
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java:64:
 error: package android.support.v4.content does not exist
   import android.support.v4.content.FileProvider;
                                    ^
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/org/apache/cordova/camera/CordovaUri.java:25:
 error: package android.support.v4.content does not exist
   import android.support.v4.content.FileProvider;
                                    ^
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/org/apache/cordova/camera/FileProvider.java:21:
 error: package android.support.v4.content does not exist
   public class FileProvider extends android.support.v4.content.FileProvider {}
                                                               ^
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:11:
 error: package android.support.annotation does not exist
   import android.support.annotation.RequiresApi;
                                    ^
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:114:
 error: cannot find symbol
       @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
        ^
     symbol:   class RequiresApi
     location: class IonicWebViewEngine.ServerClient
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java:297:
 error: cannot find symbol
           this.imageUri = new 
CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),
                                                      ^
     symbol:   method getUriForFile(Activity,String,File)
     location: class FileProvider
   
/Users/dev/Developer/diningcity-assistant/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java:803:
 error: cannot find symbol
                           Uri tmpFile = 
FileProvider.getUriForFile(cordova.getActivity(),
                                                     ^
     symbol:   method getUriForFile(Activity,String,File)
     location: class FileProvider
   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.
   7 errors
   FAILURE: Build failed with an exception.
   `
   
   So it seems both this plugin cordova-plugin-ionic-webview and camera are 
involved.
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   cordova build android
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   
   MacOS, Mojave
   
   ### Version information
   
   `
   ionic info
   
   Ionic:
   
      Ionic CLI                     : 5.4.12 
(/Users/dev/.nvm/versions/node/v12.1.0/lib/node_modules/ionic)
      Ionic Framework               : @ionic/angular 
4.4.0-dev.201904251558.2457a23
      @angular-devkit/build-angular : 0.13.8
      @angular-devkit/schematics    : 7.2.3
      @angular/cli                  : 7.2.3
      @ionic/angular-toolkit        : 1.2.3
   
   Capacitor:
   
      Capacitor CLI   : 1.0.0-beta.22
      @capacitor/core : 1.0.0-beta.19
   
   Cordova:
   
      Cordova CLI       : 9.0.0 ([email protected])
      Cordova Platforms : android 8.1.0, ios 5.1.1
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, 
cordova-plugin-ionic-webview 4.1.3, (and 18 other plugins)
   
   Utility:
   
      cordova-res : not installed
      native-run  : not installed
   
   System:
   
      ios-deploy : 1.9.4
      ios-sim    : 8.0.1
      NodeJS     : v12.1.0 (/Users/dev/.nvm/versions/node/v12.1.0/bin/node)
      npm        : 6.9.0
      OS         : macOS Catalina
      Xcode      : Xcode 11.2.1 Build version 11B500
   `
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to