Android test project is crashing with error “Test run failed: Instrumentation run failed due to 'Process crashed.'”

前端 未结 5 773
予麋鹿
予麋鹿 2021-02-12 10:41

My problem seems little different than here Test run failed: Instrumentation run failed due to 'Process crashed.' when testing multiple Android activity
I have follo

5条回答
  •  长发绾君心
    2021-02-12 11:17

    1. Don't attach more than one robotium library. robotium-solo-1.6.0.jar should be removed. It's deprecated and you really shouldn't use it anymore.

    2. Is your target application already installed? It should be installed, if you are going to run tests for it. You can not install it only if your test project has reference to target project.

    3. If you have separate APKs for application and instrumentation you should change package in your manifest. You actually have "com.testcalculator" and target package is the same - they should be different. By the way I don't see sources of application in your project, so application part should be removed.

    4. Your error doesn't say much, it's always good to post stacktrace from LogCat.

    5. Read manuals before you start writing tests:

      http://developer.android.com/tools/testing/testing_android.html https://code.google.com/p/robotium/w/list

提交回复
热议问题