我刚刚升级到com.android.tools.build:gradle:3.0.1
和最新的Android Studio稳定版(3.0.1),突然间我的espresso测试无法运行。我收到以下错误,并不知道它的含义。有什么建议吗?
[Device]: Error during Sync: Broken pipe
com.android.ddmlib.InstallException: Broken pipe
at com.android.ddmlib.Device.installPackage(Device.java:914)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:122)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:126)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:52)
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at com.android.ddmlib.AdbHelper.write(AdbHelper.java:927)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:699)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:408)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:954)
at com.android.ddmlib.Device.installPackage(Device.java:910)
答案 0 :(得分:0)
from this link这是一个旧的链接,但可能仍然有帮助。解决方案
试试这个: - 根据gradle-wrapper.properties中的最新版本更改此网址,然后更改gradle。
distributionUrl = HTTPS://services.gradle.org/distributions/gradle-4.5.1-all.zip
希望有帮助谢谢