[英]React native android build version code not updating
I have edited the versionCode in both the android\\app\\build.gradle file : 我已经在android \\ app \\ build.gradle文件中编辑了versionCode:
versionCode 2
versionName "2.0"
and I have updated the AndroidManifest.xml file 并且我已经更新了AndroidManifest.xml文件
package="com.reactnativeapp"
android:versionCode="2"
android:versionName="2.0"
BUT I still get this error when I try to release an update to my app on google play store! 但是,当我尝试在Google Play商店上发布对我的应用程序的更新时,仍然出现此错误!
You need to use a different version code for your APK or Android App Bundle
because you already have one with version code 1.
I have tried running 我尝试跑步
gradlew clean
in the android folder and rebuilding the project and nothing has worked. 在android文件夹中并重建项目,但没有任何效果。 Does anyone have any ideas? 有人有什么想法吗?
Make sure that you have your versionCode
and versionName
set inside defaultConfig
like this: 确保在defaultConfig
设置了versionCode
和versionName
如下所示:
android {
...
defaultConfig {
versionCode = 2
versionName = "2.0"
}
...
}
You might have it set up for a debug-only config, which wouldn't change for release builds. 您可能将其设置为仅调试配置,但对于发行版本不会更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.