Search code examples
androidreact-nativegoogle-play

How to avoid this huge compatibility drop for my react native app


Google warn us that our app should target API level 34 and Android 14. But on the prelaunch report, we see a huge compatibility drop. Is there any way to avoid this?

We have a lot of user that don't have recent android devices, and we would continue to provide new features to these users

enter image description here


Solution

  • When targeting a new SDK, the old SDK is still supported. For example:

    build.gradle

    android > build.gradle

      buildToolsVersion = findProperty('android.buildToolsVersion') ?: '34.0.0'
      minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '23')
      compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '34')
      targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
    

    You should keep the variable minSdkVersion as low as possible to support as many devices as possible.