简体   繁体   English

React Native Android构建版本代码未更新

[英]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设置了versionCodeversionName如下所示:

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.

相关问题 Expo React-Native Android 版本未更新 Google Play 的版本代码 - Expo React-Native Android build not updating Version Code for Google Play 更新 Gradle 版本和 Android Studio 后,Gradle 构建不适用于 React Native 项目 - Gradle build not working for React Native project after updating Gradle version and Android Studio React Native Android:index.android.bundle 在代码更改时不更新 - React Native Android : index.android.bundle not updating on code change React Native 指定的 Android SDK Build Tools 版本(23.0.1)被忽略 - React Native The specified Android SDK Build Tools version (23.0.1) is ignored React Native 版本不匹配。 无法在 Android Studio 中生成构建,但通过 VS 代码 react-native run-android 正常运行 - React Native Version mismatch. Cannot generate build in Android Studio but runs properly through VS code react-native run-android React Native Android构建 - React Native android build React native run-android 不更新修改后的代码 - React native run-android do not updating modified code 由于 React Native 版本 0.71.0-rc.0 的发布,React Native Android 构建失败并出现不同的错误,过去几天代码没有任何变化 - React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0 React Native:使用 enableSeparateBuildPerCPUArchitecture 的 Android 版本代码太大 - React Native: Version code too big for Android using enableSeparateBuildPerCPUArchitecture React本机android代码push installRelease build失败 - React native android code push installRelease build fails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM