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

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. #1985

Open
skhanbeiki opened this issue Jul 2, 2024 · 0 comments

Comments

@skhanbeiki
Copy link

When I use the latest version of ksp and hilt, it gives this error.
ksp = "2.0.0-1.0.22"
hilt = "2.51.1"

Unable to load class 'org.jetbrains.kotlin.buildtools.api.SourcesChanges'
org.jetbrains.kotlin.buildtools.api.SourcesChanges

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.
[versions]
ksp = "2.0.0-1.0.22"
hilt = "2.51.1"

[libraries]
hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }

[plugins]
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
//gradle project
  alias(libs.plugins.ksp) apply false
  alias(libs.plugins.hilt) apply false

//gradle module
    alias(libs.plugins.ksp)
    alias(libs.plugins.hilt)

dependencies {
    ksp(libs.hilt.android.compiler)
    implementation(libs.hilt.android)
}
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

1 participant