1

I want to set up calabash android for APK testing from my Windows 7 machine. I have installed Android Studio, Ruby and JAenter code hereVA JDK. i have also setup the environment variable properly. below is the version of

    C:\Users\username>ruby -v
     ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]

    C:\Users\username>gem -v
     2.6.13

    C:\Users\username>java -version
     java version "9.0.1"
     Java(TM) SE Runtime Environment (build 9.0.1+11)
     Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

I have generated the key store and calabash setup done successfully. But during resign the apk i am getting below error.

C:\calabash-test-android\Automation>bundle exec calabash-android resign 
C:\calabash-test-android\Automation\UAT-release.apk
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/calabash-android-0.9.0/lib/calabash-
android/java_keystore.rb:60:in `sign_apk': Could not sign app: 
C:/Users/TEST~1.SAD/AppData/Local/Temp/d20171204-8720-1yhtd9r/unsigned.apk 
 (RuntimeError)
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/calabash-android-0.9.0/lib/c
   alabash-android/helpers.rb:164:in `sign_apk'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/calabash-android-0.9.0/lib/c
 alabash-android/helpers.rb:119:in `block in resign_apk'
    from C:/Ruby24-x64/lib/ruby/2.4.0/tmpdir.rb:89:in `mktmpdir'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/calabash-android-0.9.0/lib/c
 alabash-android/helpers.rb:113:in `resign_apk'
    from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/calabash-android-0.9.0/bin/c
 alabash-android:133:in `<top (required)>'
    from C:/Ruby24-x64/bin/calabash-android:23:in `load'
    from C:/Ruby24-x64/bin/calabash-android:23:in `<main>'
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
bKashOST
  • 149
  • 4
  • 11
  • https://github.com/calabash/calabash-android/wiki/Running-Calabash-Android https://stackoverflow.com/questions/47628053/error-when-generating-signed-apk/47628106#47628106 – Jackey kabra Dec 04 '17 at 08:39
  • Any update on this? Facing the same problem and for now I don't know the solution... – Clergyman Mar 06 '18 at 21:56

1 Answers1

0

The recommended Ruby version is 2.3.1 for Calabash gems. You should downgrade to this version, and try again with the latest calabash-android gem (0.9.2).

kubano
  • 633
  • 7
  • 10