'How to change api level 29 to 30 in expo react native App
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.
Solution 1:[1]
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 ;
- Upgrade your expo cli to 41 or higher - npm i -g expo-cli [email protected]
- Run expo upgrade on your project
- Create a new build of your app for Google Paystore - expo build:android
This will now target api 30
Solution 2:[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"
}
...
}
Solution 3:[3]
As per the new Google Play Policy starting from August 21 all new apps must target androidSdk version 30 and the same applies to app updates from November 21
You can read in detail here
EDIT: See @Syafiqur__ 's answer below for a detailed method on how to do so. Maybe OP doesn't clearly ask the methodology and that's why only the reason why that message came was told
EDIT2: See @AyoDavid 's answer for a more React-Native way to do so
Solution 4:[4]
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"
...
}
...
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Syafiqur__ |
| Solution 3 | |
| Solution 4 | Nedko Dimitrov |
