I'm trying to configure my RN android project according to this section of the react-native-code-push docs
My build.gradle file has this configuration:
buildTypes {
debug {
}
releaseStaging {
buildConfigField "String", "CODEPUSH_KEY", CODEPUSH_KEY_STAGING
}
release {
buildConfigField "String", "CODEPUSH_KEY", CODEPUSH_KEY_PRODUCTION
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
but when i run: react-native run-android --variant releaseStaging
I get the error: Task 'installReleaseStagingDebug' not found in root project 'MyAppName'.
Also tried running react-native run-android --configuration releaseStaging
Which gave me a slightly better error:
Task 'installReleaseStaging' not found in root project 'MyAppName'. Some candidates are: 'uninstallReleaseStaging'.
Any idea what i'm missing?
Thanks!
Uri