J'ai dû migrer mon projet Android vers la nouvelle version d'Android Studio et de brancher Android pour Gradle.
J'ai suivi toutes les instructions sur https://developer.Android.com/studio/build/gradle-plugin-3-0-0-migration?utm_source=Android-studio#new_configurations , j'ai eu une erreur de construction liée à google-http-client-parent: 1.24.1 indiquant qu'il n'est pas présent dans les référentiels Maven ou Jcenter (cette version n'existe pas encore)
Dans mon application, je n'utilise que com.google.http-client: google-http-client-Android: 1.23.0 et je n'ai pas de bibliothèque avec une telle version 1.24.1, donc après des heures de recherche, je ne comprends toujours pas l'origine de cette erreur.
Le journal est comme ci-dessous:
> 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.access$100(CacheBackedTaskHistoryRepository.Java:61)
> at
> org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1.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$1.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.access$200(DefaultTaskPlanExecutor.Java:79)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.Java:104)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.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$1.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.access$1600(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$4.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.access$1700(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.access$400(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
Mon niveau d'application:
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 //http://stackoverflow.com/questions/33717886/errorexecution-failed-for-task-apptransformclasseswithdexfordebug
}
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
}
Le com.google.http-client:google-http-client-parent:1.24.1
ayant été supprimé du référentiel central maven, l'erreur a été générée.
Dans ce cas, quels que soient les fichiers jar utilisant cette référence, vous pouvez les rétrograder pour pointer vers l’ancienne version de google-http-client-parent
. Cela pourrait résoudre le problème pour le moment.
Dans votre cas, com.google.appengine.tools:appengine-gcs-client:0.4.4
utilise la référence com.google.http-client:google-http-client-parent:1.24.1
Essayez de le réduire à 0,4, ce qui devrait résoudre le problème.
J'espère que cela t'aides!
Quelqu'un a foiré.
J'ai vérifié ici: https://repo.maven.Apache.org/maven2/com/google/http-client/google-http-client-parent/
La version 1.24.1 est manquante.
mainteneur pour com.google.http-client:google-http-client-parent
ici. Lors d'une publication hier, un fichier pom.xml a été publié. Tous les autres artefacts semblent bien AFAICT moins ce pom. Sincères excuses pour les tracas.
Nous avons mis un correctif à ce problème (libérez manuellement le fichier pom.xml manquant). S'il vous plaît essayez maintenant et laissez-moi savoir si 1.24.1 ne fonctionne pas. Nous suivons généralement les problèmes sur https://github.com/google/google-http-Java-client/issues .
certains ont oublié d'ajouter 1.24.1 dans le référentiel, de sorte que lors de la construction du projet, nous devons attendre que Google mette à jour les mêmes.
Je viens d'avoir un problème similaire, pour le résoudre, j'ai googlé et découvert des personnes suggérant d'ajouter 'google ()' Gradle n'a pas pu trouver de dépendance com.google.Android.gms: play-services , mais vous avez probablement déjà fait depuis que vous avez suivi les instructions.
Dans mon cas, cela ne suffisait pas, j'ai remarqué que j'utilisais quelque chose qui nécessitait une SdKVersion plus élevée, donc je devais simplement l'augmenter à la droite minSdkVersion.
Résolu pour moi!
si vous avez cette ligne dans votre note
compile 'com.google.api-client:google-api-client-Android:+'
changez le en
compile 'com.google.api-client:google-api-client-Android:1.22.0'
ou toute autre version valide à la place de 1.22.0
Dans mon cas, le problème concernait cette ligne dans le fichier de dégradé backend
compile 'com.google.appengine.tools:appengine-gcs-client:0.7'
Après commenter ceci et commenter le code lié à GCS, ma construction fonctionnait bien. Il fait référence au com.google.http-client: google-http-client-parent: 1.24.1
Essayez d’utiliser une autre bibliothèque, par exemple google-api-client-Android: 1.22.0, cela devrait fonctionner
J'ai eu ce problème avec maven dans un projet de moteur d'application aujourd'hui, une des bibliothèques tierces que j'utilise appengine-gcs-client
dépend de la bibliothèque google-http-client
et de sa version 1.24.1
qui a évidemment été supprimée, comme vous pouvez le voir dans d'autres réponses ... Voici comment je l'ai résolu en utilisant Maven
J'ai exclu le google-http-client
de la bibliothèque qui en dépend i.e appengine-gcs-client
en utilisant le code xml suivant dans mon pom.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>
alors je donne à maven la version à utiliser lorsque la bibliothèque google-http-client
est requise, cette version est simplement une version rétro-datée de la version 1.24.1
qui est 1.23.0
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.23.0</version>
</dependency>
puis lancez simplement mvn clean install
cela a résolu le problème pour moi et cela devrait fonctionner pour vous si vous avez une bibliothèque tierce qui dépend du google-http-client-parent:1.24.1
qui manque.
vous pouvez rechercher comment exclure des dépendances en utilisant gradle
du lien suivant - Comment exclure des dépendances dans gradle