I found a solution to this problem.
Change the dependency scope of dagger from "compile" to "provided" in your 
app build.grade. Also guava should make the same change if needed.

在 2014年10月6日星期一UTC+8下午7时57分41秒,Sebastian Schuberth写道:
>
> Hi,
>
> I have an app with tests defined inside the androidTest sourceSet. We're 
> using the Espresso test framework. Running tests via connectCheck works 
> fine. But as soon as I enable instrumentation via "testCoverageEnabled 
> true" in my app's "debug" buildType, I get
>
> Tests on Nexus 4 - 4.4.4 failed: Instrumentation run failed due to 
> 'java.lang.VerifyError'
>
> com.android.builder.testing.ConnectedDevice > hasTests[Nexus 4 - 4.4.4] 
> FAILED
> No tests found.
> null
> java.io.IOException: Failed to pull /data/data/<package name>/coverage.ec 
> from device
>         at 
> com.android.builder.testing.ConnectedDevice.pullFile(ConnectedDevice.java:114)
>         at 
> com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:185)
>         at 
> com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:48)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: com.android.ddmlib.SyncException: Remote object doesn't exist!
>         at com.android.ddmlib.SyncService.pullFile(SyncService.java:314)
>         at com.android.ddmlib.Device.pullFile(Device.java:874)
>         at 
> com.android.builder.testing.ConnectedDevice.pullFile(ConnectedDevice.java:107)
>         ... 8 more
> :connectedAndroidTest FAILED
>
> At first I thought this is the infamous bug in dx in conjunction with 
> Dagger [1], but so far non of those reports were mentioning the "No tests 
> found" error. So maybe the "Remote object doesn't exist!" error indeed is 
> [1], but the earlier "No tests found" is something different. Any insights?
>
> [1] https://code.google.com/p/android/issues/detail?id=69174
>
> Regards,
> Sebastian
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to