我将我的最新稳定版本更新为android-studio
“Android Studio 2.3
”以及.gradle
2.3.0
现在,当我试图为我的应用程序的发布版本生成一个签名的 apk 时,这个“额外”的东西(签名版本:)将在最后一步中显示:
我点击了“签名帮助”,这个页面就打开了。
我按照文档对我的 build.gradle 文件进行了更改,如下所示:
apply plugin: 'com.android.application'
//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'
android {
signingConfigs {
config {
keyAlias 'xxxxxx'
keyPassword 'xxxxxx'
storeFile file('/Users/xxxxx')
storePassword 'xxxxxx'
v2SigningEnabled false
}
}
compileSdkVersion 25
buildToolsVersion "25.0.0"
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "com.xxxxx.xxx"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
}
}
repositories {
mavenCentral()
maven {
url "https://jitpack.io"
}
maven { url 'https://maven.fabric.io/public' }
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.mikepenz:fastadapter:1.8.2@aar') {
transitive = true
}
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.google.firebase:firebase-database:10.2.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
并尝试再次生成签名的 apk,但仍然显示了这个“额外”的东西。
我现在应该怎么做才能“仅使用传统方案”签署 apk?