简体   繁体   English

构建版本:清单中未找到版本代码

[英]Build Release: Version code not found in manifest

I generated a project using React-Native and followed the official RN guide to publish to Play Store.我使用 React-Native 生成​​了一个项目,并按照官方 RN 指南发布到 Play 商店。

When I get to the buildRelease step.当我到达 buildRelease 步骤时。 This outputs the following error:这会输出以下错误:

Execution failed for task ':java:packageReleaseBundle'.任务 ':java:packageReleaseBundle' 执行失败。 A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Version code not found in manifest.执行清单中未找到的 com.android.build.gradle.internal.tasks.Workers$ActionFacade 版本代码时发生故障。

When I use assembleRelease however, the build creates an apk without any issues.但是,当我使用 assembleRelease 时,构建会创建一个没有任何问题的 apk。 What am I missing?我错过了什么?

The default config under app/build.gradle is configured as such: app/build.gradle 下的默认配置是这样配置的:

defaultConfig {
    applicationId "com.company.appname"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0.0"
    missingDimensionStrategy 'react-native-camera', 'general'
}

就我而言,我不得不禁用 enableSeparateBuildPerCPUArchitecture

def enableSeparateBuildPerCPUArchitecture = false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM