我尝试使用 Diego 在以下帖子中的说明设置我的项目:http: //dtmilano.blogspot.com/2011/11/obtaining-code-coverage-of-running.html
在尝试使用启动应用程序时adb shell am instrument -e coverage true -w ...
我得到以下错误:
E/Trace ( 3989): error opening trace file: No such file or directory (2)
W/Trace ( 3989): Unexpected value from nativeGetEnabledTags: 0
W/Trace ( 3989): Unexpected value from nativeGetEnabledTags: 0
W/Trace ( 3989): Unexpected value from nativeGetEnabledTags: 0
I/dalvikvm( 3989): ****Could not find method com.vladium.emma.rt.RT.r, referenced from method com.adobe.dps.coverage.EmmaInstrumentation.$VRi
W/dalvikvm( 3989): VFY: unable to resolve static method 27137: Lcom/vladium/emma/rt/RT;.r ([[ZLjava/lang/String;J)V
D/dalvikvm( 3989): VFY: replacing opcode 0x71 at 0x004b
W/dalvikvm( 3989): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/adobe/dps/coverage/EmmaInstrumentation;
W/dalvikvm( 3989): Class init failed in newInstance call (Lcom/adobe/dps/coverage/EmmaInstrumentation;)
D/AndroidRuntime( 3989): Shutting down VM
W/dalvikvm( 3989): threadid=1: thread exiting with uncaught exception (group=0xb4cc7908)
E/AndroidRuntime( 3989): FATAL EXCEPTION: main
E/AndroidRuntime( 3989): java.lang.ExceptionInInitializerError
我在构建路径中包含了 emma.jar 并将其部署在应用程序中,但出现以下错误:
E/Trace ( 4061): error opening trace file: No such file or directory (2)
W/Trace ( 4061): Unexpected value from nativeGetEnabledTags: 0
W/Trace ( 4061): Unexpected value from nativeGetEnabledTags: 0
W/Trace ( 4061): Unexpected value from nativeGetEnabledTags: 0
W/dalvikvm( 4061): ****Exception Ljava/lang/Error; thrown while initializing Lcom/vladium/emma/rt/RT;
W/dalvikvm( 4061): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/package/coverage/EmmaInstrumentation;
W/dalvikvm( 4061): Class init failed in newInstance call (Lcom/package/coverage/EmmaInstrumentation;)
D/AndroidRuntime( 4061): Shutting down VM
W/dalvikvm( 4061): threadid=1: thread exiting with uncaught exception (group=0xb4cc7908)
E/AndroidRuntime( 4061): FATAL EXCEPTION: main
E/AndroidRuntime( 4061): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 4061): at java.lang.Class.newInstanceImpl(Native Method)
知道如何解决这个问题吗?
谢谢!