颤振问题|密钥库文件未设置用于签名配置发布 [英] Flutter Issue | Keystore file not set for signing config release
问题描述
我在运行命令时遇到了这个问题:flutter build appbundle --release或flutter build apk --release
I have this issue running the command: flutter build appbundle --release or flutter build apk --release
我将遵循flutter.dev/docs的步骤: https://flutter.dev/docs/deployment/android#configure-signing-in-gradle ,但仍然相同.
I'd follow the steps of the flutter.dev/docs: https://flutter.dev/docs/deployment/android#configure-signing-in-gradle but still the same.
我创建key.propeties文件并替换build.grade文件中的内容.
I create the key.propeties file and replace the content in the build.grade file.
也将de build类型替换为:
Also replace de build types with:
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
但仍然遇到相同的问题:
But still getting the same issue:
- 出了什么问题: 任务':app:validateSigningRelease'的执行失败.
- What went wrong: Execution failed for task ':app:validateSigningRelease'.
未为签名配置发布设置密钥库文件
Keystore file not set for signing config release
有人已经解决了这个问题吗?
Somebody already solve this issue?
推荐答案
The instructions here did not work for me out of the box. I had to change the key.properties
file path to:
def keystorePropertiesFile = rootProject.file('app/key.properties')
可以通过将值打印到控制台来测试配置是否被正确读取.例如,在gradle文件中,您可以具有:
You can test your configuration is being read properly or not by printing the values to the console. For example, in your gradle file you can have:
println keystorePropertiesFile
确保使用您期望的值填充对象
to make sure that object is populated with the values you expect
这篇关于颤振问题|密钥库文件未设置用于签名配置发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!