Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify the minSdkVersion in react native project

I have created react native project using create-react-native-app

I can see that there is a sdkVersion property in app.json, but I want to specify minSdkVersion for the app.

How do I specify the minSdkVersion in react native project?

like image 1000
Vivek Avatar asked Jul 24 '18 16:07

Vivek


2 Answers

You can change it from app/build.gradle directly Open the project go to the android/app folder and open build.gradle file. In this you can find

   defaultConfig {
    applicationId "PACKAGE_ID"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

change this minSdkVersion 16 according to your requirement

like image 143
Jay Thummar Avatar answered Nov 02 '22 02:11

Jay Thummar


I have these settings in the android\build.gradle file as per below...

buildscript {
    ext {
        supportLibVersion = "28.0.0"
        buildToolsVersion = "28.0.3"
        minSdkVersion = 23
        compileSdkVersion = 28
        targetSdkVersion = 28
    }
}
like image 30
Matt Booth Avatar answered Nov 02 '22 00:11

Matt Booth