Error when installing .apk file: Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]

811 views
Skip to first unread message

chien

unread,
Nov 15, 2012, 2:13:57 AM11/15/12
to calabash...@googlegroups.com
Hi there,

I'm new to Calabash, try to get some simple test up and running, but I ran into this error today. Simply, the log said: it cannot install the .apk file because of some missing libraries

And here is part of the log:


C:\workspace\pg-android-agentnet\agentnet-my>calabash-android run C:\workspace\pg-android-agentnet\agentnet-my\bin\agentnet-my-release.apk -v
2012-11-15 13:42:46 - cucumber -v PACKAGE_NAME=com.allproperty.android.agentnet.my MAIN_ACTIVITY=com.allproperty.android.agentnet.my.ui.phone.SplashActivity APP
_PATH="C:/workspace/pg-android-agentnet/agentnet-my/bin/agentnet-my-release.apk" TEST_APP_PATH="test_servers/6ad6fa4dd4123843da386b8bd3d78f71_0.3.2.apk" TEST_SE
RVER_PORT=34777
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
Code:
  * features/support/env.rb
  * features/support/app_installation_hooks.rb
  * features/support/app_life_cycle_hooks.rb
  * features/support/hooks.rb
  * features/step_definitions/calabash_steps.rb

2012-11-15 13:42:47 - "C:\worktools\android-sdk\platform-tools\adb.exe"  forward tcp:34777 tcp:7102
2012-11-15 13:42:47 -
2012-11-15 13:42:47 - Waking up device using:
2012-11-15 13:42:47 - "C:\worktools\android-sdk\platform-tools\adb.exe"  shell am start -a android.intent.action.MAIN -n sh.calaba.android.test/sh.calaba.instru
mentationbackend.WakeUp
Starting: Intent { act=android.intent.action.MAIN cmp=sh.calaba.android.test/sh.calaba.instrumentationbackend.WakeUp }
Features:
  * features/my_first.feature
Parsing feature files took 0m0.014s

Feature: Login feature

  Scenario: As a valid user I can log into my app # features\my_first.feature:3
2012-11-15 13:42:51 - First scenario in feature - reinstalling apps
2012-11-15 13:42:51 - "C:\worktools\android-sdk\platform-tools\adb.exe"  forward tcp:34777 tcp:7102
2012-11-15 13:42:51 -
2012-11-15 13:42:51 - Uninstalling: sh.calaba.android.test
2012-11-15 13:42:59 - Success

2012-11-15 13:42:59 - Uninstalling: com.allproperty.android.agentnet.my
2012-11-15 13:43:01 - Failure

2012-11-15 13:43:01 - Installing: test_servers/6ad6fa4dd4123843da386b8bd3d78f71_0.3.2.apk
241 KB/s (432095 bytes in 1.745s)
2012-11-15 13:43:17 - Success
2012-11-15 13:43:17 - Installing: C:/workspace/pg-android-agentnet/agentnet-my/bin/agentnet-my-release.apk
279 KB/s (2335076 bytes in 8.161s)
2012-11-15 13:43:37 - #Failure
2012-11-15 13:43:37 - '"C:\worktools\android-sdk\platform-tools\adb.exe"  install "C:/workspace/pg-android-agentnet/agentnet-my/bin/agentnet-my-release.apk"' sa
id:
2012-11-15 13:43:37 - pkg: /data/local/tmp/agentnet-my-release.apk

Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
  Could not install app C:/workspace/pg-android-agentnet/agentnet-my/bin/agentnet-my-release.apk: pkg: /data/local/tmp/agentnet-my-release.apk

  Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY] (RuntimeError)
  C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:160:in `install_app'
  C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:44:in `install_app'
  C:/workspace/pg-android-agentnet/agentnet-my/features/support/app_installation_hooks.rb:24:in `Before'
2012-11-15 13:43:37 - Starting test server using:
2012-11-15 13:43:37 - "C:\worktools\android-sdk\platform-tools\adb.exe"  shell am instrument -e target_package com.allproperty.android.agentnet.my -e main_activ
ity com.allproperty.android.agentnet.my.ui.phone.SplashActivity -e class sh.calaba.instrumentationbackend.InstrumentationBackend sh.calaba.android.test/sh.calab
a.instrumentationbackend.CalabashInstrumentationTestRunner
android.util.AndroidException: INSTRUMENTATION_FAILED: sh.calaba.android.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
        at com.android.commands.am.Am.runInstrument(Am.java:586)
        at com.android.commands.am.Am.run(Am.java:117)
        at com.android.commands.am.Am.main(Am.java:80)
        at com.android.internal.os.RuntimeInit.finishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:238)
        at dalvik.system.NativeStart.main(Native Method)
2012-11-15 13:43:40 - Checking if instrumentation backend is ready
2012-11-15 13:43:55 - Checking if instrumentation backend is ready
2012-11-15 13:44:10 - Checking if instrumentation backend is ready
2012-11-15 13:44:25 - Checking if instrumentation backend is ready
2012-11-15 13:44:40 - Checking if instrumentation backend is ready
2012-11-15 13:44:55 - Checking if instrumentation backend is ready
2012-11-15 13:45:09 - Checking if instrumentation backend is ready
2012-11-15 13:45:24 - Checking if instrumentation backend is ready
2012-11-15 13:45:39 - Checking if instrumentation backend is ready
2012-11-15 13:45:54 - Checking if instrumentation backend is ready
  Unable to make connection to Calabash Test Server at http://127.0.0.1:34777/
  Please check the logcat output for more info about what happened
   (RuntimeError)
  C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:310:in `rescue in start_test_server_in_background'
  C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:294:in `start_test_server_in_background'
  C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:57:in `start_test_server_in_background'
  C:/workspace/pg-android-agentnet/agentnet-my/features/support/app_life_cycle_hooks.rb:10:in `Before'
    When I press "Login"                          # calabash-android-0.3.2/lib/calabash-android/steps/press_button_steps.rb:17
    Then I see "PropertyGuru"                     # calabash-android-0.3.2/lib/calabash-android/steps/assert_steps.rb:5
      An existing connection was forcibly closed by the remote host. (Errno::ECONNRESET)
      C:/worktools/ruby193/lib/ruby/1.9.1/net/protocol.rb:141:in `read_nonblock'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1293:in `request'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:745:in `start'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1284:in `request'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1307:in `send_entity'
      C:/worktools/ruby193/lib/ruby/1.9.1/net/http.rb:1096:in `post'
      C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:201:in `http'
      C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:316:in `shutdown_test_server'
      C:/worktools/ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.3.2/lib/calabash-android/operations.rb:61:in `shutdown_test_server'
      C:/workspace/pg-android-agentnet/agentnet-my/features/support/app_life_cycle_hooks.rb:14:in `After'

Failing Scenarios:
cucumber features\my_first.feature:3 # Scenario: As a valid user I can log into my app

1 scenario (1 failed)
2 steps (2 skipped)
3m26.902s



Regards,
Dang Chien.
Message has been deleted

chien

unread,
Nov 15, 2012, 2:18:05 AM11/15/12
to calabash...@googlegroups.com
Sorry to mention an additional point, my app makes use of the Google Maps library for Android, which i think it might cause this problem :)
Message has been deleted

Oliver B

unread,
Nov 15, 2012, 3:01:33 AM11/15/12
to calabash...@googlegroups.com
The majority of physical devices should have this api. If you're running this on an emulator, make sure you've selected a 'Google APIs' target, as opposed to an 'Android x.y.z' target. If you're trying to run tests on a Kindle Fire, then I don't know what to tell you. I don't know of another android device that doesn't support the maps api, but I know they exist.
Reply all
Reply to author
Forward
0 new messages