skyisle / gradle-jacoco-android

DEPRECATED : Use gradle android plugin 0.10.+ it support jacoco coverage.
17 stars 4 forks source link

RESULT: remote object '/sdcard/com.the42apps.jacocosamplejacoco.exec' does not exist #2

Open sunhao111999 opened 10 years ago

sunhao111999 commented 10 years ago

@skyisle

hi, from your sample, i get this error:

RESULT: remote object '/sdcard/com.the42apps.jacocosamplejacoco.exec' does not exist

in AndroidManifest.xml, i add:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>

but still error, please help!

skyisle commented 10 years ago

Did you specify test runner to com.alanjeon.testing.JacocoRunner?

sunhao111999 commented 10 years ago

@skyisle @ze12augusto

yes, i did. but now i got another error:

D/JacocoRunner( 3025): endCoverage started!
D/JacocoRunner( 3025): java.lang.reflect.InvocationTargetException
D/JacocoRunner( 3025): java.lang.reflect.InvocationTargetException
D/JacocoRunner( 3025):  at java.lang.reflect.Method.invokeNative(Native Method)
D/JacocoRunner( 3025):  at java.lang.reflect.Method.invoke(Method.java:525)
D/JacocoRunner( 3025):  at com.alanjeon.testing.JacocoRunner.endCoverage(JacocoRunner.java:47)
D/JacocoRunner( 3025):  at com.alanjeon.testing.JacocoRunner.finish(JacocoRunner.java:82)
D/JacocoRunner( 3025):  at com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner$BridgeTestRunner.finish(GoogleInstrumentationTestRunner.java:264)
D/JacocoRunner( 3025):  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:574)
D/JacocoRunner( 3025):  at com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner.onStart(GoogleInstrumentationTestRunner.java:167)
D/JacocoRunner( 3025):  at com.alanjeon.testing.JacocoRunner.onStart(JacocoRunner.java:74)
D/JacocoRunner( 3025):  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
D/JacocoRunner( 3025): Caused by: java.lang.IllegalStateException: JaCoCo agent not started.
D/JacocoRunner( 3025):  at org.jacoco.agent.rt.internal_6effb9e.Agent.getInstance(Agent.java:72)
D/JacocoRunner( 3025):  at org.jacoco.agent.rt.RT.getAgent(RT.java:32)
D/JacocoRunner( 3025):  ... 9 more
I/GoogleInstr( 3025): Unstopped activity count: 1