问题
I am running calabash-android in a docker file and when I run the calabash test I got the error
/usr/local/bundle/gems/calabash-android-0.7.2/lib/calabash-android/java_keystore.rb:6:in `initialize': No such keystore file '/home/core/Android/debug.keystore' (RuntimeError)
I have tried this this and not working for me.
Edit
After setting up the path the error is like
/lib/calabash-android/java_keystore.rb:32:in `initialize': Could not list certificates in keystore. Probably because the password was incorrect. (RuntimeError)
回答1:
It can be fixed by navigating to the /.android directory and remove the debug.keystore file if exist one and go try the command
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000
And following that navigate to the directory where the feature files exist and setup the calabash android by using the command
calabash-android setup
The resign the new debug.keystore file using the command
calabash-android resign <apk path>
And finally we can run the test by using the command
calabash-android run <apk path>
回答2:
There's an interesting thing to note. If your keystore password has $
, then you need to escape it in .calabash_settings
file.
Look at the content of this file:
{"keystore_location":"my-release-keystore.jks","keystore_password":"abc$123","keystore_alias":"MyAlias"}
If you leave "abc$123" like this, you should get an error. Then you should escape the password like the following example:
{"keystore_location":"my-release-keystore.jks","keystore_password":"abc\\$123","keystore_alias":"MyAlias"}
Take a look at \\ for escaping special characters.
来源:https://stackoverflow.com/questions/36492001/could-not-list-certificates-in-keystore-probably-because-the-password-was-incor