首页 > 解决方案 > React Native : Change targeted sdk version for play store upload

问题描述

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

标签: react-nativereact-native-android

解决方案


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"

推荐阅读