Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix fastlane error: Keystore file 'keystore.jks' not found for signing config 'externalOverride'.?

Am new to fastlane, when I write the command for deploy the app to internal test its show me the following error:

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

It seems that the error because the location of the keystore, I already put the keystore in app file of the project, I did that in other project and its work fine, but in this I dont know why its not working

I also tried to change the keystore location but still

this lane in 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
like image 674
Rooh Al-mahaba Avatar asked Sep 04 '19 17:09

Rooh Al-mahaba


2 Answers

As @Rooh Al-mahaba says, I had to supply the complete filepath as the value for "android.injected.signing.store.file".

Also, ~/ didn't work; I needed to explicitly spell out the full filepath.

like image 143
Josh Avatar answered Sep 17 '22 11:09

Josh


INFO: For other users:

You can create several ENV variables, this is useful for 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']
      })

Later you need to modify .bash_profile and add the ENV variables.

like image 38
jordiz Avatar answered Sep 18 '22 11:09

jordiz