我在Android Playstore上有一个应用程序。我想发布一个新版本的应用程序。我已检查了我的代码,原始文件没有应用版本行,如下所示android:versionCode="1"
我可以将这行代码添加到新版本中,如下所示,即使它没有出现在原始版本上吗?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="2"
package="com..........." >
答案 0 :(得分:0)
如果使用gradle构建应用程序(如预期的那样),请忽略AndroidManifest.xml
并在相应的build.gradle
文件中调整这些属性,因为gradle将覆盖清单中的这些值。
同时检查字段versionName
答案 1 :(得分:0)
如果使用Eclipse,则应用程序版本代码位于manifest.xml中。
在Android studio中,版本代码存储在app文件夹中的build.gradle文件中。如果您想更改它,只需更改文件或使用菜单&#34;项目结构&#34; (Ctrl + Alt + SHIFT + S)。
我不相信你可以在没有版本代码的情况下在游戏市场上发布应用程序。我建议你查看开发者控制台发布的版本。
答案 2 :(得分:0)
在应用的build.gradle文件中,
android {
.
.
defaultConfig {
applicationId "com......"
minSdkVersion 15
targetSdkVersion 22
versionCode 2 //Should be greater than playstore
versionName 1.1
}
.
.
}
如果 versionCode 不大于Playstore上提供的应用的版本代码,则会要求您更新应用。
要检查设备上应用的版本代码,请安装 Dexplorer 应用,然后在manifest.xml中找到versionCode
希望这有帮助!
答案 3 :(得分:0)
build.gradle文件应该是这样的:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.nascenia.pfa"
minSdkVersion 15
targetSdkVersion 22
versionCode 1 // change here
versionName "2.2" // change your version here
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
}