Android Gradle 3.0.0 的插件:找不到 com.google.http-client:google-http-client-parent:1.24.1

Android Plugin for Gradle 3.0.0 : Could not find com.google.http-client:google-http-client-parent:1.24.1

我不得不将我的 android 项目迁移到新版本的 Android Studio 并 Android 插入 Gradle。

我遵循了 https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration?utm_source=android-studio#new_configurations 中的所有说明 但是当同步和构建时,我得到了一个与 google-http-client-parent:1.24.1 相关的构建错误,指出它不存在于存储库 Maven 或 Jcenter 中(实际上这个版本还不存在)

在我的应用程序中 gradle 我只使用 com.google.http-client:google-http-client-android:1.23.0 我没有库这样的 1.24.1 版本所以经过几个小时的研究我仍然不明白这个错误的起源。

日志如下:

> org.gradle.api.UncheckedIOException: Failed to capture snapshot of
> input files for task ':backend:compileJava' property 'classpath'
> during up-to-date check.  at
> org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.snapshotTaskFiles(CacheBackedTaskHistoryRepository.java:333)
>   at
> org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.createExecution(CacheBackedTaskHistoryRepository.java:154)
>   at
> org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.access0(CacheBackedTaskHistoryRepository.java:61)
>   at
> org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.getCurrentExecution(CacheBackedTaskHistoryRepository.java:114)
>   at
> org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactStateRepository.java:201)
>   at
> org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:86)
>   at
> org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:53)
>   at
> org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
>   at
> org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
>   at
> org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
>   at
> org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
>   at
> org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
>   at
> org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
>   at
> org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
>   at
> org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
>   at
> org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
>   at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.run(DefaultTaskGraphExecuter.java:248)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
>   at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
>   at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
>   at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
>   at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access0(DefaultTaskPlanExecutor.java:79)
>   at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.execute(DefaultTaskPlanExecutor.java:104)
>   at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.execute(DefaultTaskPlanExecutor.java:98)
>   at
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
>   at
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
>   at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
>   at
> org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
>   at
> org.gradle.internal.concurrent.ManagedExecutorImpl.run(ManagedExecutorImpl.java:46)
>   at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at
> org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
>   at java.lang.Thread.run(Thread.java:745) Caused by:
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
> Could not resolve all files for configuration
> ':backend:compileClasspath'.  at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:918)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access00(DefaultConfiguration.java:116)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:892)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:404)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown
> Source)   at
> org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:68)
>   at
> org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter$FileCollectionVisitorImpl.visitCollection(AbstractFileCollectionSnapshotter.java:70)
>   at
> org.gradle.api.internal.file.AbstractFileCollection.visitRootElements(AbstractFileCollection.java:234)
>   at
> org.gradle.api.internal.file.CompositeFileCollection.visitRootElements(CompositeFileCollection.java:185)
>   at
> org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter.snapshot(AbstractFileCollectionSnapshotter.java:53)
>   at
> org.gradle.api.internal.changedetection.state.DefaultCompileClasspathSnapshotter.snapshot(DefaultCompileClasspathSnapshotter.java:38)
>   at
> org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.snapshotTaskFiles(CacheBackedTaskHistoryRepository.java:331)
>   ... 35 more Caused by:
> org.gradle.internal.resolve.ModuleVersionResolveException: Could not
> resolve com.google.http-client:google-http-client-jackson2:[1.19,2.0).
> Required by:
>     project :backend > com.google.appengine.tools:appengine-gcs-client:0.4.4  at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver.resolve(DynamicVersionResolver.java:99)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyToComponentIdResolver.resolve(RepositoryChainDependencyToComponentIdResolver.java:61)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.ComponentResolversChain$DependencyToComponentIdResolverChain.resolve(ComponentResolversChain.java:149)
>   at
> org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionResolver.resolve(DependencySubstitutionResolver.java:46)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.SelectorState.resolveModuleRevisionId(SelectorState.java:99)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.EdgeState.resolveModuleRevisionId(EdgeState.java:91)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.performSelectionSerially(DependencyGraphBuilder.java:261)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.resolveEdges(DependencyGraphBuilder.java:226)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:143)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:109)
>   at
> org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:90)
>   at
> org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolveGraph(DefaultConfigurationResolver.java:146)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolveGraph(ShortCircuitEmptyConfigurationResolver.java:73)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolveGraph(ErrorHandlingConfigurationResolver.java:66)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.run(DefaultConfiguration.java:483)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
>   at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:474)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:459)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access00(DefaultConfiguration.java:116)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getSelectedArtifacts(DefaultConfiguration.java:901)
>   at
> org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:889)
>   ... 44 more Caused by:
> org.gradle.internal.resolve.ModuleVersionResolveException: Could not
> resolve com.google.http-client:google-http-client-jackson2:1.24.1.    at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:129)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$CandidateResult.process(DynamicVersionResolver.java:354)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$CandidateResult.resolve(DynamicVersionResolver.java:342)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$CandidateResult.tryResolveMetadata(DynamicVersionResolver.java:365)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$CandidateResult.access0(DynamicVersionResolver.java:299)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$RepositoryResolveState.matches(DynamicVersionResolver.java:255)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DefaultVersionedComponentChooser.selectNewestMatchingComponent(DefaultVersionedComponentChooser.java:87)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$RepositoryResolveState.selectMatchingVersionAndResolve(DynamicVersionResolver.java:248)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver$RepositoryResolveState.resolve(DynamicVersionResolver.java:237)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver.findLatestModule(DynamicVersionResolver.java:140)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver.findLatestModule(DynamicVersionResolver.java:121)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver.resolve(DynamicVersionResolver.java:88)
>   ... 67 more Caused by:
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException:
> Could not parse POM
> https://jcenter.bintray.com/com/google/http-client/google-http-client-jackson2/1.24.1/google-http-client-jackson2-1.24.1.pom
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:54)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.AbstractModuleDescriptorParser.parseMetaData(AbstractModuleDescriptorParser.java:43)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.parseMetaDataFromResource(MavenResolver.java:269)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.parseMetaDataFromResource(MavenResolver.java:65)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.parseMetaDataFromArtifact(ExternalResourceResolver.java:222)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.parseMetaDataFromArtifact(MavenResolver.java:170)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.parseMetaDataFromArtifact(MavenResolver.java:65)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveStaticDependency(ExternalResourceResolver.java:193)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.doResolveComponentMetaData(MavenResolver.java:145)
>   at
> org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceResolver.java:467)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveComponentMetaData(CachingModuleComponentRepository.java:363)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveComponentMetaData(BaseModuleComponentRepositoryAccess.java:50)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.resolveComponentMetaData(InMemoryCachedModuleComponentRepository.java:95)
>   at
> org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:126)
>   ... 78 more Caused by:
> org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not
> find com.google.http-client:google-http-client-parent:1.24.1. Searched
> in the following locations:
>     https://jcenter.bintray.com/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.pom
>     https://jcenter.bintray.com/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.jar
>     https://dl.google.com/dl/android/maven2/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.pom
>     https://dl.google.com/dl/android/maven2/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.jar
>     https://maven.google.com/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.pom
>     https://maven.google.com/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.jar
>     https://repo.maven.apache.org/maven2/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.pom
>     https://repo.maven.apache.org/maven2/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.jar
>     https://maven-central.storage.googleapis.com/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.pom
>     https://maven-central.storage.googleapis.com/com/google/http-client/google-http-client-parent/1.24.1/google-http-client-parent-1.24.1.jar
>   at
> org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult.notFound(DefaultBuildableComponentResolveResult.java:38)
>   at

>   ... 101 more

我的应用程序 gradle :

apply plugin: 'com.android.application'

buildscript {
    repositories {
        mavenCentral()

        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        google()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.github.nrudenko:gradle-android-cq-plugin:0.1+'
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.2'
    }
}

repositories {
    mavenCentral()
    maven { url 'http://wordpress-mobile.github.io/WordPress-Android' }
    maven { url 'https://maven.fabric.io/repo' }
    maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy' }
    maven { url "https://jitpack.io" }
    maven { url 'https://oss.sonatype.org/content/groups/public' }
    jcenter()
}

//


apply plugin: 'android-cq'
apply plugin: 'io.fabric'



android {

    packagingOptions {
        exclude "META-INF/LICENSE.txt"
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude "META-INF/NOTICE.txt"
    }

    compileSdkVersion 26

    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 16
        targetSdkVersion 26
        renderscriptTargetApi 24//added for BlurKit
        renderscriptSupportModeEnabled true //added for BlurKit
        //minifyEnabled true
        multiDexEnabled true
        buildConfigField "String", "APP_PN_KEY", "\"org.wordpress.android.playstore\""
    }

    // Specifies flavor dimensions.
    flavorDimensions "minApi"
    productFlavors {
        // Define separate dev and prod product flavors.

        minApi19 {
            dimension "minApi"
            minSdkVersion 19
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt', 'proguard-google-api-client.txt'

        }

        debug {
            buildConfigField "String", "APP_PN_KEY", "\"org.wordpress.android.debug.build\""
            ext.enableCrashlytics = false
        }

    }

   useLibrary 'org.apache.http.legacy'

    dexOptions {
        javaMaxHeapSize "4g"
        preDexLibraries = false //
    }

    lintOptions {
        abortOnError false
    }

}


dependencies {

    implementation 'com.android.support:multidex:1.0.3'

    implementation (project(path: ':OCR2016')){
        exclude group: 'supportDependencies'
    }
    implementation (project(':pagerTabSliding')){
        exclude group: 'com.android.support'
    }
    implementation project(':quickScroll')
    implementation project(':pinnedSectionListLibrary')
    implementation (project(':sectionCursorAdapterLibrary')){
        exclude group: 'com.android.support'
    }
    implementation (project(':mainActivityZxing')){
        exclude group: 'com.android.support'
    }
    implementation (project(':libraryObservableScrollView')){
        exclude group: 'com.android.support'
    }
    implementation (project(':libraryFloatingButton')){
        exclude group: 'com.android.support'
    }
    implementation project(':simplequickaction')
    implementation (project(':keyboardemojicon')){
        exclude group: 'com.android.support'
    }
    implementation project(':simplecropimagelib')
    implementation (project(':cardstack')){
        exclude group: 'com.android.support'
    }
    implementation (project(path: ':cardstackview')){
        exclude group: 'com.android.support'
    }

    implementation('org.wordpress:mediapicker:1.2.4') {
        exclude group: 'com.android.support'
    }

    // Provided by project library
    implementation (project(path: ':libs:utils:WordPressUtils')){
        exclude group: 'com.android.support'
        exclude group: 'commons-lang'
    }


    implementation (project(path: ':libs:networking:WordPressNetworking')){
        exclude group: 'com.android.support'
    }

    implementation project(path: ':libs:wpcomrest:WordPressComRest')
    implementation project(path: ':libs:graphview:WordPressGraphView')
    implementation project(path: ':libs:persistentedittext:PersistentEditText')
     implementation (project(path: ':libs:analytics:WordPressAnalytics')){
        exclude group: 'com.android.support'
    }
    implementation (project(path: ':libs:editor:WordPressEditor')){
        exclude group: 'com.android.support'
    }
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'

    implementation supportDependencies.supportcompat
    implementation supportDependencies.cardViewV7
    implementation supportDependencies.recyclerViewV7
    implementation supportDependencies.appcompatV7
    implementation supportDependencies.supportV4
    implementation supportDependencies.paletteV7
    implementation supportDependencies.supportAnnotations
    implementation (supportDependencies.design) {
        exclude(group: 'com.android.support', module:'support-annotations')
    }
    implementation (supportDependencies.supportV13) {
        exclude(group: 'com.android.support', module:'support-annotations')
    }

    implementation 'com.github.chrisbanes.photoview:library:1.2.3'
    implementation 'com.helpshift:android-aar:3.7.2'
    implementation 'commons-lang:commons-lang:2.6'
    implementation 'de.greenrobot:eventbus:2.4.0'
    implementation 'com.mcxiaoke.volley:library:1.0.+'

    implementation 'org.wordpress:gcm:1.0.0'
    implementation 'org.wordpress:drag-sort-listview:0.6.1'
    implementation 'org.wordpress:slidinguppanel:1.0.0'
    implementation 'org.wordpress:android-passcodelock:0.0.6'
    implementation 'org.wordpress:emailchecker:0.3'
    implementation 'com.simperium.android:simperium:0.6.3'


    implementation 'com.squareup.okhttp:okhttp:2.3.0'

    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'com.github.paolorotolo:appintro:4.1.0'

    implementation 'org.jsoup:jsoup:1.8.3'
    // required
    implementation 'com.leocardz:link-preview:1.2.1@aar'
    implementation 'com.google.android.gms:play-services-maps:15.0.1' //11.6.0
    implementation 'com.google.android.gms:play-services-places:15.0.1'
    implementation 'com.google.android.gms:play-services-identity:15.0.1'
    implementation 'com.google.android.gms:play-services-gcm:15.0.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'//10/11/2017 added by david, check that there is no clash with other library
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-ads:15.0.1'
    implementation 'com.github.Angtrim:Android-Five-Stars-Library:v3.1'
    implementation 'com.flurgle:blurkit:1.1.1'
    //implementation 'ru.egslava:blurredview:1.0'
    implementation('com.mikepenz:aboutlibraries:6.0.0@aar') {
        transitive = true
    }
    //used to provide different itemAnimators for the RecyclerView
    //https://github.com/mikepenz/ItemAnimators
    implementation 'com.mikepenz:itemanimators:0.5.0@aar'
    //implementation 'me.mvdw.recyclerviewmergeadapter:recyclerviewmergeadapter:2.0.0'
    implementation 'com.github.viethoa:fastscroller:1.2.0'
    implementation 'com.github.danylovolokh:hashtag-helper:1.1.0'

    //Mopub : With the modular SDK, you can choose to include specific formats to decrease overall SDK footprint in your app
    // For banners
    implementation('com.mopub:mopub-sdk-banner:4.11.0@aar') {
        transitive = true
        exclude(group: 'com.android.support', module:'support-annotations')
    }
    // For native static (images).
    implementation('com.mopub:mopub-sdk-native-static:4.11.0@aar') {
        transitive = true
        exclude(group: 'com.android.support', module: 'support-annotations')
    }


    // Endpoints Frameworks V2: Endpoints Framework v2 migration
    endpointsServer project(path: ':appbackend', configuration: 'endpoints')
    implementation ('com.google.http-client:google-http-client-android:1.23.0')  {
        exclude(group: 'com.google.android', module: 'android')
        exclude(group: 'com.google.code.findbugs')
    }

    // Add the Google API client library.
    implementation(group: 'com.google.api-client', name: 'google-api-client', version: '1.23.0') {
        exclude(group: 'com.google.code.findbugs')
        exclude(group: 'xpp3', module: 'xpp3')
        exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
        exclude(group: 'junit', module: 'junit')
        exclude(group: 'com.google.android', module: 'android')
    }

}


apply plugin: 'com.google.gms.google-services'


configurations.all {

    exclude group: "org.apache.httpcomponents", module: "httpclient"
    exclude group: 'org.wordpress', module: 'utils'
    exclude group: 'org.wordpress', module: 'analytics'
    exclude module: 'annotations' 
}

// For app signing
if (["storeFile", "storePassword", "keyAlias", "keyPassword"].count {
    !project.hasProperty(it)
} == 0) {
    android {
        signingConfigs {
            release {
                storeFile = file(project.storeFile)
                storePassword = project.storePassword
                keyAlias = project.keyAlias
                keyPassword = project.keyPassword
            }
        }
    }
    android.buildTypes.release.signingConfig = android.signingConfigs.release

}

我刚刚遇到了类似的问题,为了解决这个问题,我在谷歌上搜索并发现人们建议添加 'google()' ,但您可能已经按照说明完成了。

在我的情况下,这还不够,我注意到我使用的东西需要更高的 SdKVersion,所以我只需要将它增加到正确的 minSdkVersion。

有人搞砸了。

我在这里查看:https://repo.maven.apache.org/maven2/com/google/http-client/google-http-client-parent/

缺少 1.24.1 版本。

有些人忘记在存储库中添加 1.24.1,以便在构建项目时 gradle 可以下载它,我们应该等到 google 更新它。

帮我解决了!

如果您的 gradle

中有此行
      compile 'com.google.api-client:google-api-client-android:+'

改为

      compile 'com.google.api-client:google-api-client-android:1.22.0'

或替代 1.22.0 的任何其他有效版本

由于 com.google.http-client:google-http-client-parent:1.24.1 已从 Maven 中央存储库中删除,它开始抛出错误。

在这种情况下,无论使用此引用的 jar 什么,都可以降级为指向 google-http-client-parent 的旧版本。这可以暂时解决问题。

在您的例子中,com.google.appengine.tools:appengine-gcs-client:0.4.4 使用的是 com.google.http-client:google-http-client-parent:1.24.1

的引用

尝试将其降级到 0.4 应该可以解决问题。

希望对您有所帮助!

在我的例子中,问题出在 后端 gradle 文件

中的这一行

编译'com.google.appengine.tools:appengine-gcs-client:0.7'

注释掉 并注释与 GCS 链接的代码后,我的构建工作正常。它指的是 com.google.http-client:google-http-client-parent:1.24.1

我今天在 App Engine 项目中遇到了这个问题,我正在使用的第三方库之一 appengine-gcs-client 取决于库 google-http-client 及其使用版本 1.24.1从其他答案中可以看出,这显然已被删除....这是我使用 maven

解决它的方法

我从依赖它的库中排除了 google-http-clientappengine-gcs-client 在我的 pom.xml

中使用以下 xml 代码
   <dependency>
        <groupId>com.google.appengine.tools</groupId>
        <artifactId>appengine-gcs-client</artifactId>
        <version>0.7</version>
        <exclusions>             
            <exclusion>
                <groupId>com.google.http-client</groupId>
                <artifactId>google-http-client</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

然后我给 maven 一个版本,以便在需要 google-http-client 库时使用,这个版本只是版本 1.24.1 的一个过时版本,它是 1.23.0

        <dependency>
            <groupId>com.google.http-client</groupId>
            <artifactId>google-http-client-jackson2</artifactId>
            <version>1.23.0</version>
        </dependency>

然后 运行 mvn clean install

这解决了我的问题,如果您有依赖于缺少的 google-http-client-parent:1.24.1 的第三方库,它应该对您有用。

您可以从以下 link How to exclude dependencies in gradle

中查找如何使用 gradle 排除依赖项

com.google.http-client:google-http-client-parent 的维护者。在昨天的一次发布中,以某种方式发布了 pom.xml。所有其他工件似乎都很好 AFAICT 减去这个 pom。对于给您带来的麻烦,我们深表歉意。

我们已经修复了这个问题(手动释放缺失的 pom.xml)。请立即尝试,如果 1.24.1 不起作用,请告诉我。我们通常在 https://github.com/google/google-http-java-client/issues.

跟踪问题

尝试使用不同的库,例如 google-api-client-android:1.22.0 这应该可以工作