How to change api level 29 to 30 in expo react native App
Asked Answered
P

3

11

This Message was appear when i upload my app bundle to play store

Your app currently targets API level 29 and must target at least API level 30 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 30.

Prerogative answered 25/8, 2021 at 16:54 Comment(0)
U
16

If you have a managed workflow expo app. To make expo target new Api level 30, you need to upgrade your app to Expo SDK 41 or higher. Do the following ;

  1. Upgrade your expo cli to 41 or higher - npm i -g expo-cli [email protected]
  2. Run expo upgrade on your project
  3. Create a new build of your app for Google Paystore - expo build:android

This will now target api 30

Unbacked answered 2/9, 2021 at 17:44 Comment(1)
Run on the terminal of the project: expo upgradeTeletypewriter
G
2

Open build.gradle under android/app/

find the android { } block

Change the following version to the below:

compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27

In case your current android/app/build.gradle has lines which look like :

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

You will have to edit the android/build.gradle to include :

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 21
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    ...
}
Grisly answered 2/9, 2021 at 2:35 Comment(0)
G
0

In NON-EXPO projects edit the andoid/build.gradle file as follows:

buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "20.1.5948944"
        ...
    }
    ...
}
Guertin answered 21/3, 2022 at 8:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.