如何修复 fastlane 错误:找不到用于签名配置“externalOverride”

我是 fastlane 新手,当我编写将应用程序部署到内部测试的命令时,它显示以下错误:


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':app:validateSigningRelease'.

> Keystore file '/Users/rooh/.gradle/daemon/5.1.1/keystore.jks' not found for signing config 'externalOverride'.


* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


* Get more help at https://help.gradle.org


Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

Use '--warning-mode all' to show the individual deprecation warnings.

See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

看来错误是因为密钥库的位置,我已经将密钥库放在项目的应用程序文件中,我在其他项目中这样做了并且它工作正常,但在这里我不知道为什么它不起作用


我也尝试更改密钥库位置,但仍然


fastfile 中的这条通道:


desc "Deploy a new internal version to the Google Play Store"

lane :internal do

gradle(task: "clean")



gradle(

  task: "assemble",

  build_type: "Release",

  print_command: false,

  properties: {

    "android.injected.signing.store.file" => "keystore.jks",

    "android.injected.signing.store.password" => "*****",

    "android.injected.signing.key.alias" => "alias",

    "android.injected.signing.key.password" => "*****"

    }


)


changelog = prompt(

text: "Changelog: ",

multi_line_end_keyword: "END"

)



supply(

  track: "internal",

  apk: lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH].to_s

)

upload_to_play_store(track: "internal")

end


森林海
浏览 159回答 3
3回答

三国纷争

我必须提供完整的文件路径作为"android.injected.signing.store.file".另外,~/没有工作;我需要明确地阐明完整的文件路径。

皈依舞

信息:对于其他用户:您可以创建多个 ENV 变量,这对于 CI 很有用。build_android_app(      task: "assemble",       build_type: "Release",       flavor: "development",      flags: "--stacktrace",      print_command: false,      properties:{        "android.injected.signing.store.file" => ENV['KEYSTORE_PATH'],        "android.injected.signing.store.password" => ENV['STORE_PASSWORD'],        "android.injected.signing.key.alias" => ENV['KEY_ALIAS'],        "android.injected.signing.key.password" => ENV['KEY_PASSWORD'],        "org.gradle.java.home" => ENV['JAVA_HOME']      })稍后您需要修改 .bash_profile 并添加 ENV 变量。

森栏

Flutter + Fastlane + GitHub 操作我遇到了同样的问题,就我而言,我可以通过将密钥库文件放在./android/fastlane/和./android/app/fastlane/文件夹中来使其工作。这是因为我的 Fastlane 配置位于./android/fastlane/文件夹内,但是,当您运行build_android_app / gradle./android/app/任务时,它会默认尝试获取文件夹中的密钥库文件,并且您不能告诉它执行其他操作,除非您使用绝对路径(这不是一个好的做法),因为 Fastlane 任务无法解析相对路径。此外,如果我从文件夹中删除密钥库文件./android/fastlane/,它会抱怨,即使它存在于./android/app/fastlane/.
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java