React Native : Change targeted sdk version for play store upload

Sadhu picture Sadhu · May 16, 2018 · Viewed 23.9k times · Source

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).

Answer

Albert Gao picture Albert Gao · May 18, 2018

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 the dependencies block, change the appcompat line to match the target version

compile "com.android.support:appcompat-v7:27.1.1"