Android 错误:";在清单中找不到版本代码;
我正在尝试构建已签名的应用程序包,以便发布。我所做的只是更新操作系统版本和一些图形。该应用程序在ADK上运行良好。 在构建已签名的apk时,我收到以下错误消息: “在清单中找不到版本代码。” 这是错误日志: “原因:com.android.ide.common.workers.WorkerExecutorException:Android 错误:";在清单中找不到版本代码;,android,android-studio,Android,Android Studio,我正在尝试构建已签名的应用程序包,以便发布。我所做的只是更新操作系统版本和一些图形。该应用程序在ADK上运行良好。 在构建已签名的apk时,我收到以下错误消息: “在清单中找不到版本代码。” 这是错误日志: “原因:com.android.ide.common.workers.WorkerExecutorException: 工人提出了1个例外情况: com.android.tools.build.bundletool.exceptions.manifest.ManifestVersionExc
工人提出了1个例外情况: com.android.tools.build.bundletool.exceptions.manifest.ManifestVersionException$versionCommissionException: 在清单中找不到版本代码。“ 谢谢所有能帮我解决这个小问题的人。我在这里搜索,没有找到一个好的补丁
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sevillasoundservices.warningshot">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ShotgunSensing"
android:label="@string/title_activity_shotgun"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".RifleSensing"
android:label="@string/title_activity_rifle"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PistolSensing"
android:label="@string/title_activity_pistol"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
我希望这里有人能告诉我遗漏了什么。我希望简单地在清单文件中插入一些代码来解决这个问题,但是,其他编码者清单的所有其他示例都没有任何版本显示在任何地方。将
版本代码添加到渐变中。像下面这样的
defaultConfig {
applicationId "com.sevillasoundservices.warningshot"
minSdkVersion 24
targetSdkVersion 28
versionName '1.0.2'
versionCode 3
}
versionCode
是一个增量整数,用于确定哪个版本高于另一个版本。我认为这只适用于已签名的APK,这就是为什么您之前没有看到错误
更多信息可在中找到。您是否也可以添加模块的gradle文件?是的,请再次检查问题,它现在应该会出现在那里。谢谢,我将尝试此操作,并向您报告。成功了!现在要记住如何上传,以及上传了什么,哈哈。我从这里休息了很长时间,太长了。如果你接受这个答案,让大家知道你的问题的解决方案是什么,那就太好了。这就是所谓的一切
defaultConfig {
applicationId "com.sevillasoundservices.warningshot"
minSdkVersion 24
targetSdkVersion 28
versionName '1.0.2'
versionCode 3
}