In Play Store I am trying to upload my app but I'm getting a warning i.e. mentioned below:
Target API level requirements from August 2018
Warning:
Your app currently targets API level 22 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance.
From August 2018, new apps must target at least Android 8.0 (API level 26). From November 2018, app updates must target Android 8.0 (API level 26).
Step 1: Open your project in Android mode then go to Gradle Scripts > build. gradle(Module: app) as shown in the following image. Step 2: Refer to the below image and here you have to change the minSdkVersion and targetSdkVersion as per the requirement.
To do so open android/build. gradle in your React Native project and then increment the compileSdkVersion and targetSdkVersion values to 29 . buildscript { ext { buildToolsVersion = "28.0. 3" minSdkVersion = 16 compileSdkVersion = 29 targetSdkVersion = 29 } // ... }
You can see it here on their official build. gradle file: android { compileSdkVersion 28 ... defaultConfig { minSdkVersion(16) targetSdkVersion(28) versionCode(1) versionName("1.0") } ... } By setting minSdkVersion to 16 , react-native uses Android API's natively supported by at least KitKat version.
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 the dependencies block, change the appcompat
line to match the target version
compile "com.android.support:appcompat-v7:27.1.1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With