Android Studio 2.2-无法再创建未签名的发行版本-"validateSigningReleaseLive FAILED" [英] Android Studio 2.2 - Can no longer create unsigned release builds - "validateSigningReleaseLive FAILED"
问题描述
升级到Android Studio 2.2后,我无法再创建未签名的发行版.调试版本创建良好.这个问题在Android Studio 2.1上没有发生.我不知道.该应用程序gradle文件具有以下内容:
After upgrading to Android Studio 2.2, I can no longer create an unsigned release build. Debug builds are created fine. This problem didn't happen on Android Studio 2.1. I can't figure it out. The app gradle file has this:
defaultConfig {
applicationId "com.company.myapp"
versionCode 66
versionName "1.0"
signingConfig signingConfigs.noSigning
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
buildTypes {
debug {
}
release {
minifyEnabled true // Set to true to enable proguard
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
signingConfig signingConfigs.noSigning
zipAlignEnabled false
}
releaseLive.initWith(buildTypes.release);
releaseLive {
signingConfig signingConfigs.noSigning
}
}
这是在运行gradle任务"assembleRelease
"或"assembleReleaseLive
"时发生的情况,然后我在运行"窗口中按文本模式"按钮以获取文本输出:
This is what happens when the gradle task 'assembleRelease
' or 'assembleReleaseLive
' is run, then I press the "text mode" button on the 'Run' window to get the text output:
Executing external task 'assembleReleaseLive'...
:app:preBuild UP-TO-DATE
...
[All tasks run successfully up to until this]
...
:app:lintVitalReleaseLive
:app:validateSigningReleaseLive FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningReleaseLive'.
> Keystore file not set for signing config noSigning
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
有人知道如何解决这个问题吗?如果我删除"signingConfig"
行,它不会修复它.
Does anyone know how to solve this? If I remove the "signingConfig"
lines, it does not fix it.
推荐答案
我最终弄清楚了:删除"signingConfig signingConfigs.noSigning
"的所有3行,其中"noSigning
"的定义为:
I eventually figured it out: Remove all 3 lines of "signingConfig signingConfigs.noSigning
", where "noSigning
" was defined as:
signingConfigs {
noSigning {
keyAlias ''
keyPassword ''
storePassword ''
storeFile null
}
defaultSigning {
storeFile file('signing/signing.keystore')
storePassword 'password'
keyAlias 'alias'
keyPassword 'password'
}
}
这些"noSigning
"行在Android Studio 2.2上似乎不起作用.我想无论如何它们都是非标准的,因为默认情况下,"assembleRelease"任务将默认创建一个未签名的版本.
Those "noSigning
" lines do not seem to work on Android Studio 2.2. I guess they are non-standard anyway, because the 'assembleRelease' task will create an unsigned build by default anyway.
这篇关于Android Studio 2.2-无法再创建未签名的发行版本-"validateSigningReleaseLive FAILED"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!