[15:00:48]: ▸ Only one alias can be specified
[15:00:48]: ▸ Please type jarsigner -help for usage
desc "Build and Sign APK"
lane :build do |options|
gradle(task: "clean")
gradle(task: "assemble")
sign_apk(
keystore_path: "${HOME}/keystores/mykeystore.jks",
alias: "my app",
storepass: options[:storepass],
tsa: "http://timestamp.comodoca.com/rfc316",
keypass: options[:keypass],
)
zipalign(apk_path: "#{lane_context[SharedValues::SIGNED_APK_PATH]}")
gradle(task: "test")
slack(message: "Android Build Success: Test App", success: true)
end
答案 0 :(得分:0)
首先,Fastlane不接受密钥别名中的空格("")。因此,我必须更改现有别名以删除空格。要删除空格,
keytool -changealias -keystore yourkeystore.jks -alias 'my keystore' -destalias mynewkeystore.
如果您使用Jenkins作为自动化的构建过程,那么在Jenkins服务器中设置Project时,请给出不带空格的项目名称。这很重要。