Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle corrupt after add this plugin #21

Closed
shoulder0902 opened this issue Feb 26, 2023 · 3 comments
Closed

Gradle corrupt after add this plugin #21

shoulder0902 opened this issue Feb 26, 2023 · 3 comments

Comments

@shoulder0902
Copy link

shoulder0902 commented Feb 26, 2023

As below:

org.gradle.api.internal.project.DefaultProject_Decorated cannot be cast to org.gradle.api.initialization.Settings
org.gradle.api.internal.project.DefaultProject_Decorated cannot be cast to org.gradle.api.initialization.Settings

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.

I tried the methods mentioned above:

  1. Re-download dependencies and sync project
  2. Stop Gradle build processes
    And:
  3. kill Gradle daemon, delete the Gradle caches
  4. I use the Gradle 8+, so I create a new project with basic configured Gradle 7.4.2 and add this plugin.

The problem appeared again.

@TheNaqvi
Copy link

Same problem for me with gradle 8.0.1

@jbartok
Copy link
Member

jbartok commented Feb 28, 2023

The plugin is compatible with Gradle 7.6 or newer only.
What do you mean by I use the Gradle 8+, so I create a new project with basic configured Gradle 7.4.2 and add this plugin.? If you use Gradle 7.4.2, then it's expected to fail.
If you are using Gradle 8+, pls. create an issue with a reproducer on the gradle/gradle repo.
Or re-open this issue, but provide a bit more info, so I can reproduce the problem.

@jbartok jbartok closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2023
@zameelpichen
Copy link

I am having the same issue

android_gradle_plugin = 8.0.0
gradleversion = 8.1

image

following is my root build.gradle.kts file


plugins {
    alias(libs.plugins.dependencyanalysis)
    id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"

}

buildscript {
    repositories {
        mavenCentral()
        google()
        gradlePluginPortal()
    }
    dependencies {
        classpath(libs.android.gradle.plugin)
        classpath(libs.kotlin.gradle.plugin)
        classpath(libs.aboutlibraries.plugin)
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

Note : I maybe missing something obvious here.
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants