react native android version support code example
Example 1: react native android version code
// android/app/build.gradle
android {
defaultConfig {
versionCode 1
versionName "1.0"
{...}
}
{...}
}
Example 2: react native version
{ "name": "AwesomeProject", "version": "0.0.1", "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start",+ "postversion": "react-native-version" }}
Example 3: react native version
$ npm install react-native-version --save-dev# or $ yarn add react-native-version --dev