我試圖根據反應本機代碼的推文檔Codepush陣營Android本地staging-任務installReleaseStagingDebug根項目未發現
我的build.gradle文件中有這樣的this section配置我的RN的Android項目配置:
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
}
}
但是當我運行:react-native run-android --variant releaseStaging
我得到的錯誤:Task 'installReleaseStagingDebug' not found in root project 'MyAppName'.
還試圖運行react-native run-android --configuration releaseStaging
這給了我一個稍微好一點的錯誤:
Task 'installReleaseStaging' not found in root project 'MyAppName'. Some candidates are: 'uninstallReleaseStaging'.
任何想法,我缺少的是什麼?
謝謝!
Uri