title: Build failed error: cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
body: <p>I tried building my ionic app after development; but in the process the following errors surfaced:</p>
  <blockquote>
  <p>C:\incidentApp\platforms\android\app\src\main\java\com\moust\cordova\videoplayer\VideoPlayer.java:123:
  error: cannot find symbol if (Build.VERSION.SDK_INT &gt;=
  Build.VERSION_CODES.R) { ^ &gt; Task :app:compileDebugJavaWithJavac
  symbol:   variable R location: class VERSION_CODES
  C:\incidentApp\platforms\android\app\src\main\java\com\moust\cordova\videoplayer\VideoPlayer.java:124:
  error: cannot find symbol
  dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
  ^ symbol:   variable Type location: class WindowInsets
  C:\incidentApp\platforms\android\app\src\main\java\com\moust\cordova\videoplayer\VideoPlayer.java:124:
  error:  cannot find symbol
  dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
  ^ symbol:   method getInsetsController() location: class Window 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</p>
  <p>FAILURE: Build failed with an exception.</p>
  <blockquote>
  <p>Task :app:compileDebugJavaWithJavac FAILED 24 actionable tasks: 1 executed, 23 up-to-date</p>
  </blockquote>
  <ul>
  <li>What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.</li>
  </ul>
  <blockquote>
  <p>Compilation failed; see the compiler error output for details.</p>
  </blockquote>
  <ul>
  <li><p>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.  Run with --scan to get full insights.</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 2m 5s c:\incidentApp\platforms\android\gradlew:
  Command failed with exit code 1 Error output:
  C:\incidentApp\platforms\android\app\src\main\java\com\moust\cordova\videoplayer\VideoPlayer.java:123:
  error:  cannot find symbol if (Build.VERSION.SDK_INT &gt;=
  Build.VERSION_CODES.R) { ^ symbol:   variable R location: class
  VERSION_CODES
  C:\incidentApp\platforms\android\app\src\main\java\com\moust\cordova\videoplayer\VideoPlayer.java:124:
  error:  cannot find symbol
  dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
  ^ symbol:   variable Type location: class WindowInsets
  C:\incidentApp\platforms\android\app\src\main\java\com\moust\cordova\videoplayer\VideoPlayer.java:124:
  error:  cannot find symbol
  dialog.getWindow().getInsetsController().hide(WindowInsets.Type.statusBars());
  ^ symbol:   method getInsetsController() location: class Window 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</p>
  <p>FAILURE: Build failed with an exception.</p>
  <ul>
  <li>What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.</li>
  </ul>
  <blockquote>
  <p>Compilation failed; see the compiler error output for details.</p>
  </blockquote>
  </blockquote>
  <p>I'd tried everything(removing of android package and re-installing) I could lay my hands on but still not working.</p>
  <p>Below is my <strong>build.gradle</strong></p>
  <pre><code> project.ext {
        defaultBuildToolsVersion=&quot;29.0.3&quot; //String
        defaultMinSdkVersion=22 //Integer - Minimum requirement is Android 5.1
        defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
        defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default
      }
  </code></pre>