1

I tried to use the EclEmma code coverage tool to check coverage of test cases, but got the following error:

java.lang.NoClassDefFoundError: android/test/ActivityInstrumentationTestCase2

How can I fix this?

enter image description here enter image description here enter image description here

Pops
  • 30,199
  • 37
  • 136
  • 151
Justin k
  • 1,104
  • 5
  • 22
  • 33

1 Answers1

0

You can read about the fact on eclEmma homepage that eclEmma is not supported in Java 7 because it fails with java7 bytecode:( if you go back to Java6 you can use it!

dexametason
  • 1,133
  • 7
  • 16
  • Will conversion from java 7 to 6 affect to android project? – Justin k Apr 08 '12 at 19:06
  • @Justink If you don't use the java7 features you can convert your project easily. – dexametason Apr 08 '12 at 19:07
  • Hey, I have checked on my project properties, "java compiler version is 1.6" only. Still I am getting error of class not found. I have place image of my project properties along the main question. – Justin k Apr 08 '12 at 19:16
  • @Justink Could you tell me what you can read in the middle of eclipse? I'm interested in the line starts with like in your first screeshot. – dexametason Apr 08 '12 at 19:19
  • I have uploaded a zoom out version of that image. Please let me know if you need any more infor. – Justin k Apr 08 '12 at 19:31
  • @Justink I'm not a java version expert but I think you should install JDK1.6 too to be able to use it. I'm not sure. But your question is answered, you should go back to java6 to use eclEmma. That's all I can help you. – dexametason Apr 08 '12 at 19:35
  • Hi, I have the same issue, but I am sure I am not using Java 1.7. The jre I use is 1.6.0.33, yet I still get this problem. – NioShobu Aug 22 '12 at 20:27
  • Did you ever solve this Justin? I'm having the same issue and it's killing me. – span Oct 09 '12 at 13:30