eriwen / gradle-js-plugin

Gradle plugin for working with JS
http://eriwen.github.io/gradle-js-plugin
Apache License 2.0
382 stars 113 forks source link

Unable to find method org.gradle.api.internal.project.ProjectInternal.getServices #143

Closed JohannRosenberg closed 7 years ago

JohannRosenberg commented 7 years ago

I get the following error when I refresh my Gradle:

Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.getServices()Lorg/gradle/internal/service/scopes/ServiceRegistryFactory;'. Possible causes for this unexpected error include:

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

My gradle.build looks like this:

apply plugin: 'js'
apply plugin: 'css'

// define the dependencies gradle buildscript will use to build
// the app (not the app itself)
buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
    }

    dependencies {
        classpath 'com.eriwen:gradle-css-plugin:1.8.0'
        classpath 'com.eriwen:gradle-js-plugin:1.9.0'
    }
}

I'm using the same version of gradle that this plugin uses.

douglasbandeiraivo commented 3 years ago

Was this problem resolved? I'm getting a similar issue simply putting the command:

plugins { id "com.eriwen.gradle.js" version "2.14.1" }

The issue is this:

Unable to find method 'org.gradle.api.internal.AbstractNamedDomainObjectContainer: method 'void (java.lang.Class, org.gradle.internal.reflect.Instantiator)' not found' org.gradle.api.internal.AbstractNamedDomainObjectContainer: method 'void (java.lang.Class, org.gradle.internal.reflect.Instantiator)' not found

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.