title: Execution Failed capacitor-cordova-android-plugins:compileDebugJavaWithJavac in Ionic 6
body: <p>I am using Cordova plugin to use fileOpener in the capacitor ionic project. Before this, everything was working fine as I install following packages:</p>
  <pre><code>npm install @ionic-native/file
  npm install cordova-plugin-file
  npm install @ionic-native/file-opener
  npm install cordova-plugin-file-opener2
  </code></pre>
  <p>Here is the error I am facing:</p>
  <pre><code>  &gt; Configure project :
  The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in 
  February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.4/userguide/upgrading_version_6.html#jcenter_deprecation
          at build_dcpio6s66acap9ob7gfqiirhb$_run_closure1$_closure2.doCall(C:\Project\Ionic\mock-service\android\build.gradle:7)
          (Run with --stacktrace to get the full stack trace of this deprecation warning.)
  WARNING:: Using flatDirs should be avoided because it doesn't support any meta-data formats.
  Currently detected usages:
  - repository flatDir used in: project ':app', project ':capacitor-cordova-android-plugins'  
  WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.     
  This repository is deprecated and it will be shut down in the future.
  See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
  Currently detected usages in: root project 'android', project ':app', project ':capacitor-android', ...
  
  &gt; Task :capacitor-android:compileDebugAidl NO-SOURCE
  Relying on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated. This is scheduled to be removed in Gradle 8.0. Annotate the property sourceFiles with @IgnoreEmptyDirectories or remove @SkipWhenEmpty. Consult the upgrading guide for further information: https://docs.gradle.org/7.4/userguide/upgrading_version_7.html#empty_directories_file_tree
  
  &gt; Task :app:compileDebugRenderscript NO-SOURCE
  Relying on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated. This is scheduled to be removed in Gradle 8.0. Annotate the property sourceDirs with @IgnoreEmptyDirectories or remove @SkipWhenEmpty. Consult the upgrading guide for further information: https://docs.gradle.org/7.4/userguide/upgrading_version_7.html#empty_directories_file_tree
  
  &gt; Task :capacitor-cordova-android-plugins:compileDebugJavaWithJavac FAILED
  C:\Project\Ionic\mock-service\android\capacitor-cordova-android-plugins\src\main\java\io\github\pwlin\cordova\plugins\fileopener2\FileProvider.java:28: error: package android.support.v4.content does not exist
  public class FileProvider extends android.support.v4.content.FileProvider {
                                                              ^
  C:\Project\Ionic\mock-service\android\capacitor-cordova-android-plugins\src\main\java\io\github\pwlin\cordova\plugins\fileopener2\FileOpener2.java:119: error: cannot find symbol
                                                  path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + &quot;.fileOpener2.provider&quot;, file);
                                                                     ^
    symbol:   method getUriForFile(android.content.Context,java.lang.String,java.io.File)
    location: class io.github.pwlin.cordova.plugins.fileopener2.FileProvider
  C:\Project\Ionic\mock-service\android\capacitor-cordova-android-plugins\src\main\java\io\github\pwlin\cordova\plugins\fileopener2\FileOpener2.java:127: error: cannot find symbol
                                          Uri path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + &quot;.fileOpener2.provider&quot;, file);
                                                                 ^
    symbol:   method getUriForFile(android.content.Context,java.lang.String,java.io.File)
    location: class io.github.pwlin.cordova.plugins.fileopener2.FileProvider
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  Note: C:\Project\Ionic\mock-service\android\capacitor-cordova-android-plugins\src\main\java\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  3 errors
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':capacitor-cordova-android-plugins:compileDebugJavaWithJavac'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  &gt; Run with --stacktrace option to get the stack trace.
  &gt; Run with --info or --debug option to get more log output.
  &gt; Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 8s
  70 actionable tasks: 1 executed, 69 up-to-date
  </code></pre>
  <p>Package.json:</p>
  <pre><code>     &quot;dependencies&quot;: {
      &quot;@angular/common&quot;: &quot;~13.0.0&quot;,
      &quot;@angular/core&quot;: &quot;~13.0.0&quot;,
      &quot;@angular/forms&quot;: &quot;~13.0.0&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~13.0.0&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~13.0.0&quot;,
      &quot;@angular/router&quot;: &quot;~13.0.0&quot;,
      &quot;@capacitor/android&quot;: &quot;3.4.1&quot;,
      &quot;@capacitor/app&quot;: &quot;1.1.0&quot;,
      &quot;@capacitor/core&quot;: &quot;3.4.1&quot;,
      &quot;@capacitor/haptics&quot;: &quot;1.1.4&quot;,
      &quot;@capacitor/keyboard&quot;: &quot;1.2.2&quot;,
      &quot;@capacitor/status-bar&quot;: &quot;1.0.8&quot;,
      &quot;@ionic-native/file&quot;: &quot;^5.36.0&quot;,
      &quot;@ionic-native/file-opener&quot;: &quot;^5.36.0&quot;,
      &quot;@ionic/angular&quot;: &quot;^6.0.0&quot;,
      &quot;cordova-plugin-file&quot;: &quot;^6.0.2&quot;,
      &quot;cordova-plugin-file-opener2&quot;: &quot;^3.0.5&quot;,
      &quot;rxjs&quot;: &quot;~6.6.0&quot;,
      &quot;tslib&quot;: &quot;^2.2.0&quot;,
      &quot;zone.js&quot;: &quot;~0.11.4&quot;
    },
  </code></pre>
  <p>Java Version:</p>
  <pre><code>java version &quot;1.8.0_321&quot;
  Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
  Java HotSpot(TM) Client VM (build 25.321-b07, mixed mode)
  </code></pre>
  <p>gradle Version:</p>
  <pre><code>distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
  </code></pre>
  <p>I have tried everything on the internet. Maybe I missed something. Please help me to fix this problem. Thank you</p>