生成我的apk不会更新我的版本代码。 已在manifest和build.grandle中更改 当分析apk没有更新apk时,它保留了版本码1.1.9,因此我无法在Play商店中更新它。
的AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dese.diario"
android:windowSoftInputMode="stateHidden|adjustResize"
android:versionCode="22"
android:versionName="1.2.2"
>
<uses-sdk android:minSdkVersion="8" />
<!-- To auto-complete the email text field in the login form with the user'Theme emails -->
<!-- <uses-permission android:name="android.permission.READ_PROFILE" /> -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<protected-broadcast android:name="android.intent.action.MEDIA_MOUNTED" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<application
android:allowBackup="true"
android:hardwareAccelerated="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="icon,android:theme">
.....
</application>
</manifest>
的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '25.0.3'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.dese.diario"
minSdkVersion 19
targetSdkVersion 26
versionCode 22
versionName "1.2.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
release {
keyAlias 'AMDI'
keyPassword 'safa2017'
storeFile file('C:KeyDiario/KeyDiario.jks')
storePassword 'safa2017'
}
debug {
/* storeFile file('keystore/debug.keystore')
keyAlias 'androiddebugkey'
keyPassword 'android'
storePassword 'android'*/
keyAlias 'AMDI'
keyPassword 'safa2017'
storeFile file('C:KeyDiario/KeyDiario.jks')
storePassword 'safa2017'
}
}
.....
}
apply plugin: 'com.google.gms.google-services'
分析APK:
答案 0 :(得分:1)
将android studio更新为版本3后,我也遇到此问题
过了一段时间,我意识到apk文件夹的位置已经改变了 “app”到“app \ release \”
因此,解决方案是在app \ release文件夹中使用apk
答案 1 :(得分:0)
我解决了我的问题, 当生成apk时。 更改值:
minifyEnabled false
到
minifyEnabled true