查看: 802|回复: 6

[Android常见问题] 今天gradle经常报错 Could not download MobTools.jar (com.mob:MobTools:20...

[复制链接]

Rank: 1

主题:
帖子:
积分:
0

[Android常见问题] 今天gradle经常报错 Could not download MobTools.jar (com.mob:MobTools:20...

[复制链接]
802 6 | 发表于 2018-7-10 16:03:26 |阅读模式 | |
Android Studio gradle经常报如下错误,请问是哪里原因呢?谢谢
Gradle 4.4
Gradle Plugin: 3.1.3

  1. Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download MobTools.jar (com.mob:MobTools:2018.0704.1157)
  2.         at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveArtifact(ExternalResourceResolver.java:506)
  3.         at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveArtifact(CachingModuleComponentRepository.java:409)
  4.         at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveArtifact(BaseModuleComponentRepositoryAccess.java:65)
  5.         at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.resolveArtifact(InMemoryCachedModuleComponentRepository.java:124)
  6.         at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveArtifact(ErrorHandlingModuleComponentRepository.java:171)
  7.         at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainArtifactResolver.resolveArtifact(RepositoryChainArtifactResolver.java:80)
  8.         at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet$LazyArtifactSource.create(DefaultArtifactSet.java:171)
  9.         at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet$LazyArtifactSource.create(DefaultArtifactSet.java:158)
  10.         at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:135)
  11.         at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ArtifactBackedResolvedVariant$DownloadArtifactFile.run(ArtifactBackedResolvedVariant.java:146)
  12.         at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
  13.         at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
  14.         at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
  15.         at org.gradle.internal.progress.DefaultBuildOperationExecutor.access$900(DefaultBuildOperationExecutor.java:63)
  16.         at org.gradle.internal.progress.DefaultBuildOperationExecutor$ParentPreservingQueueWorker.execute(DefaultBuildOperationExecutor.java:378)
  17.         at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runOperation(DefaultBuildOperationQueue.java:230)
  18.         at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.access$600(DefaultBuildOperationQueue.java:172)
  19.         at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable$1.call(DefaultBuildOperationQueue.java:209)
  20.         at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable$1.call(DefaultBuildOperationQueue.java:203)
  21.         at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
  22.         at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runBatch(DefaultBuildOperationQueue.java:202)
  23.         at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.run(DefaultBuildOperationQueue.java:177)
  24.         ... 6 more
  25. Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'http://mvn.mob.com/android/com/mob/MobTools/2018.0704.1157/MobTools-2018.0704.1157.jar'.
  26.         at org.gradle.internal.resource.ResourceExceptions.failure(ResourceExceptions.java:74)
  27.         at org.gradle.internal.resource.ResourceExceptions.getFailed(ResourceExceptions.java:57)
  28.         at org.gradle.internal.resource.transfer.AccessorBackedExternalResource.withContentIfPresent(AccessorBackedExternalResource.java:146)
  29.         at org.gradle.internal.resource.BuildOperationFiringExternalResourceDecorator$11.call(BuildOperationFiringExternalResourceDecorator.java:237)
  30.         at org.gradle.internal.resource.BuildOperationFiringExternalResourceDecorator$11.call(BuildOperationFiringExternalResourceDecorator.java:229)
  31.         at org.gradle.internal.progress.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:350)
  32.         at org.gradle.internal.progress.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:340)
  33.         at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
  34.         at org.gradle.internal.progress.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:120)
  35.         at org.gradle.internal.resource.BuildOperationFiringExternalResourceDecorator.withContentIfPresent(BuildOperationFiringExternalResourceDecorator.java:229)
  36.         at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.copyToCache(DefaultCacheAwareExternalResourceAccessor.java:199)
  37.         at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.access$300(DefaultCacheAwareExternalResourceAccessor.java:55)
  38.         at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor$1.create(DefaultCacheAwareExternalResourceAccessor.java:90)
  39.         at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor$1.create(DefaultCacheAwareExternalResourceAccessor.java:82)
  40.         at org.gradle.cache.internal.ProducerGuard$AdaptiveProducerGuard.guardByKey(ProducerGuard.java:97)
  41.         at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:82)
  42.         at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadByCoords(DefaultExternalResourceArtifactResolver.java:129)
  43.         at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:95)
  44.         at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveArtifact(DefaultExternalResourceArtifactResolver.java:67)
  45.         at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveArtifact(ExternalResourceResolver.java:499)
  46.         ... 27 more
  47. Caused by: java.net.SocketTimeoutException: Read timed out
  48.         at java.net.SocketInputStream.socketRead0(Native Method)
  49.         at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
  50.         at java.net.SocketInputStream.read(SocketInputStream.java:171)
  51.         at java.net.SocketInputStream.read(SocketInputStream.java:141)
  52.         at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
  53.         at org.apache.http.impl.io.SessionInputBufferImpl.read(SessionInputBufferImpl.java:200)
  54.         at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
  55.         at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
  56.         at org.gradle.internal.resource.transfer.AbstractProgressLoggingHandler$ProgressLoggingInputStream.read(AbstractProgressLoggingHandler.java:77)
  57.         at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
  58.         at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
  59.         at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
  60.         at com.google.common.io.CountingInputStream.read(CountingInputStream.java:62)
  61.         at java.io.FilterInputStream.read(FilterInputStream.java:107)
  62.         at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1488)
  63.         at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1465)
  64.         at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor$DownloadAction.execute(DefaultCacheAwareExternalResourceAccessor.java:249)
  65.         at org.gradle.internal.resource.transfer.AccessorBackedExternalResource.withContentIfPresent(AccessorBackedExternalResource.java:137)
  66.         ... 44 more

复制代码



Rank: 1

主题:
帖子:
积分:
0
 楼主| 发表于 2018-7-10 16:13:22 |
好像是你们的Maven服务器问题,很不稳定啊,请看截图,现在app已无法编译运行了
BaiduShurufa_2018-7-10_16-8-17.png

Rank: 5Rank: 5

主题:
帖子:
积分:
0
发表于 2018-7-10 16:28:00 |
Zhao 发表于 2018-7-10 16:13
好像是你们的Maven服务器问题,很不稳定啊,请看截图,现在app已无法编译运行了

...

现在的集成方式都可以不用maven的方式了,您看下文档 只要配置了jcenter就可以了,这个就跟我们服务器关系不大的了亲,如果还是一样 建议您自己看下自己的gradle的缓存清理下 然后在试试看;还有如果有问题今天会接到很多反馈才对,目前为止还没有,而且这边测试也是可以的,如果不会清理缓存可以加下我们QQ4006852216

Rank: 1

主题:
帖子:
积分:
0
 楼主| 发表于 2018-7-10 20:48:53 |
wolf 发表于 2018-7-10 16:28
现在的集成方式都可以不用maven的方式了,您看下文档 只要配置了jcenter就可以了,这个就跟我们服务器关 ...

你好,谢谢您的回复,我用的就是你们推荐的在线集成的方式,就是通过jcenter啊

Rank: 5Rank: 5

主题:
帖子:
积分:
0
发表于 2018-7-11 09:47:54 |
Zhao 发表于 2018-7-10 20:48
你好,谢谢您的回复,我用的就是你们推荐的在线集成的方式,就是通过jcenter啊

...

还有具体问题可以加技术支持扣扣咨询  4006852216

Rank: 1

主题:
帖子:
积分:
0
发表于 前天 16:36 |
Zhao 发表于 2018-7-10 16:13
好像是你们的Maven服务器问题,很不稳定啊,请看截图,现在app已无法编译运行了

...

我也遇到了同样的问题,在线集成gradle就编译不过

Rank: 5Rank: 5

主题:
帖子:
积分:
0
发表于 前天 17:12 |
将app下build目录删除后重新编译测试下看看。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

技术支持
免费咨询 | 24小时在线
快速回复 返回顶部 返回列表