React Native Android needs to target API level 29 before November 2, 2020

Viewed 5359

As per the new Google Play policy, all apps must target at least Android 10 (API 29) before November 2, 2020.

More info: https://developer.android.com/distribute/play-policies

React Native is targeting API 28 as of today(v0.63), are there any plans to update the target SDK version?

2 Answers

Open android/build.gradle in your React Native project and change compileSdkVersion and targetSdkVersion values to 29.

android/build.gradle

buildscript {
ext {
    buildToolsVersion = "29.0.5"
    minSdkVersion = 16
    compileSdkVersion = 29
    targetSdkVersion = 29
}
}

Then go Android Studio and Run "Sync Project with File System" (File > Sync Project with Gradle Files).

It's necessary to upgrade your React Native version. You can see the instructions here.

A simple cli upgrade did the trick for me:

npx react-native upgrade
Related