Updated September 15, 2020

How to Upgrade React Native App to API Level 29

You may have seen the following message.

When you upload an APK, it needs to meet Google Play’s target API level requirements. New apps must target Android 10 (API level 29) or higher and app updates must target Android 9 (API level 28) or higher.

Read the full notice.

What's this mean?

Basically, you need to update your targetSdk to ensure you can continue to upload your React Native app.

React Native CLI

To do so open android/build.gradle in your React Native project and then increment the compileSdkVersion and targetSdkVersion values to 29.

android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 29
        targetSdkVersion = 29
    }
    // ...
}

allprojects {
    // ...
}

Then in Android Studio, Run "Sync Project with Gradle Files" (File > Sync Project with Gradle Files).

Screenshot of Android Studio

And you should be all set!

Expo

If you're on Expo SDK 38+ you should be all set since you build your mobile app on their servers there is no work for you, other than ensuring you keep your app up to date!

Problems?

  • Make sure you have the latest android studio installed (Android Studio > Check for Updates)
React Native School Logo

React Native School

Want to further level up as a React Native developer? Join React Native School! You'll get access to all of our courses and our private Slack community.

Learn More