原因:org.gradle.internal.resolve.ModuleVersionResolveException:无法解析com.android.support:multidex-instrumentation:1.0.2。 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository $ ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:141)处 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.process(ComponentMetaDataResolveState.java:75) 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.resolve(ComponentMetaDataResolveState.java:63) 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.findBestMatch(RepositoryChainComponentMetaDataResolver.java:138)处 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.findBestMatch(RepositoryChainComponentMetaDataResolver.java:119) 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolveModule(RepositoryChainComponentMetaDataResolver.java:92) ...另外194个 引起原因:org.gradle.api.resources.ResourceException:无法获取资源“ https://dl.google.com/dl/android/maven2/com/android/support/multidex-instrumentation/1.0.2/multidex-instrumentation-1.0.2.pom”。 在org.gradle.internal.resource.ResourceExceptions.failure(ResourceExceptions.java:74) 在org.gradle.internal.resource.ResourceExceptions.getFailed(ResourceExceptions.java:57) 在org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.copyToCache(DefaultCacheAwareExternalResourceAccessor.java:201) 在org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.access $ 300(DefaultCacheAwareExternalResourceAccessor.java:54) 在org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor $ 1.create(DefaultCacheAwareExternalResourceAccessor.java:89) 在org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor $ 1.create(DefaultCacheAwareExternalResourceAccessor.java:81) 在org.gradle.cache.internal.ProducerGuard $ AdaptiveProducerGuard.guardByKey(ProducerGuard.java:97) 在org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:81) 在org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadByCoords(DefaultExternalResourceArtifactResolver.java:133)处 在org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:97) 在org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveArtifact(DefaultExternalResourceArtifactResolver.java:64)处 在org.gradle.api.internal.artifacts.repositories.metadata.AbstractRepositoryMetadataSource.parseMetaDataFromArtifact(AbstractRepositoryMetadataSource.java:69) 在org.gradle.api.internal.artifacts.repositories.metadata.AbstractRepositoryMetadataSource.create(AbstractRepositoryMetadataSource.java:59) 在org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveStaticDependency(ExternalResourceResolver.java:244) 在org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.doResolveComponentMetaData(MavenResolver.java:127) 在org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver $ RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceResolver.java:445) 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository $ ResolveAndCacheRepositoryAccess.resolveComponentMetaData(CachingModuleComponentRepository.java:378)处 在org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository $ ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:138)处 ...还有199
答案 0 :(得分:0)
添加:
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
}
}
或者如果您仍然遇到问题,那么:
allprojects {
repositories {
google()
}
}
答案 1 :(得分:0)
我找到了解决问题的方法https://stackoverflow.com/a/53803951/8984393 但我不想将minSdkVersion升级到21