How to update android target api level in React-Native

What this article includes:

  • What is target api level in android?
  • How to update target api level?
  • References to learn more

What is target api level in android?

Target api level defines app support for android version. We need to update target api level to support latest android version. For e.g. API level 29 is required for Android 10.

How to update target api level?

We can update target api level in <code>build.gradle</code> present in <code>src/android</code>. We will need to update <code>targetSdkVersion</code>, <code>buildToolsVersion</code>, <code>compileSdkVersion</code> and <code>supportLibVersion</code>.

js
1buildToolsVersion = "28.0.3" compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" // How it will look when we change from target api level 28 to 29 buildToolsVersion = "29.0.3" compileSdkVersion = 29 targetSdkVersion = 29 supportLibVersion = "29.0.0"

References to learn more

<blockquote>[Check out my e-book on MongoDB](__GHOST_URL__/mongodb-practical-masterclass/)</blockquote>