Material-components-android: Unable to find method 'org.gradle.api.internal.artifacts.ivyservice

Created on 24 Jul 2019  路  4Comments  路  Source: material-components/material-components-android

Description: Cannot Sync Build initial Clone

Expected behavior: Sync and Build is necessary to get started

Source code: n/a

Android API version: no idea

Material Library version: latest - (I just cloned it) no idea

Device: Windows Android Studio

this is the error:

Unable to find method 'org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectPublicationRegistry.registerPublication(Ljava/lang/String;Lorg/gradle/api/internal/artifacts/ivyservice/projectmodule/ProjectPublication;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

image

bug

Most helpful comment

This looks to still be the case

All 4 comments

Duplicate of #401 and #375.

You'll have to revert any local changes you have, specifically your gradle-wrapper.properties file should be using Gradle 4.6, and your build.gradle file should be using com.android.tools.build:gradle:3.3.2.

Well, when I change the gradle to 4.6, the following occurs:
ERROR: Minimum supported Gradle version is 4.10.1. Current version is 4.6.

I just cloned the repo and using Master (322cbaa) where version 4.10.1 is defined but it won't work because:
ERROR: The specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip' does not appear to contain a Gradle distribution.

However I could make it work with gradle version 4.10.2

This looks to still be the case

this was a long time ago, it was (if I recall correctly) one of the dependencies being out of date in the build.gradle and also I added

android {
     compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
Was this page helpful?
0 / 5 - 0 ratings