JUnit4 + Eclipse “An internal error occurred during Launching”

后端 未结 10 1587
深忆病人
深忆病人 2020-12-09 16:37

I\'m trying to run JUnit4 test cases on Eclipse 3.4.2 but it\'s not even starting for me. I have the junit-4.7.jar in my build path and the test application.

Here i

10条回答
  •  一向
    一向 (楼主)
    2020-12-09 17:18

    This error In eclipse can be caused if you are also using the Android Development Kit plugins:

    "Launching UTest' has encountered a problem
        An internal error occurred during: "Launching UTest".
        java.lang.NullPointerException
    

    Can be caused if you are loading a normal Java project into an Eclipse instance with android ADT plugins installed and enabled. In this situation, Eclipse looks for "Android" project files, and doesn't find any. So it says: "NullPointerException".

    So to fix it, re-download Eclipse without the ADT Plugin: https://www.eclipse.org/downloads/

    Then re-import your project fresh. And the junit tests run without a problem.

    Many people hate eclipse for it's enigmatic error messages. It's like we are back in the 1950's punch card world, where there are no error messages. The program just halts and undefined behavior occurs.

提交回复
热议问题