Search code examples
selendroid

How to reslove instrumentation error in selendroid?


I have given following coding to start android device.While running,it points the android device and it creates the Android driver App in android device,after that it throws the following error message.

  WebDriver driver = new RemoteWebDriver(DesiredCapabilities.android());
driver.get("url");   

Error message:

     Failed tests:   setUp(mobileweb.photocentric.ScrollArticleTest): Could not start the app under test using instrumentation.
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation
    at com.android.commands.am.Am.runInstrument(Am.java:865)
    at com.android.commands.am.Am.onRun(Am.java:282)
    at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
    at com.android.commands.am.Am.main(Am.java:76)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)
    at dalvik.system.NativeStart.main(Native Method)

Solution

  • I had the same problem and I found out that the androiddriver package was conflicting with a previous version installed in my device.

    Try uninstalling the package from your device with the following command:

    adb shell pm uninstall io.selendroid.io.selendroid.androiddriver