Plugin [id: 'com.google.devtools.ksp'] wurde nicht gefunden.
Was ich versuche zu tun
Ich versuche einfach, die Room- und KSP-Abhängigkeiten zu einem neuen Android Studio-Projekt hinzuzufügen, um ein lokales Projekt einzurichten Datenbank.
Die Fehlermeldung
Plugin [id: 'com.google.devtools.ksp', Version: '2.0.21-1.0.1'] wurde in keiner der folgenden Quellen gefunden:
- Gradle Core Plugins
- Enthaltene Builds
- Plugin-Repositories (Plugin-Artefakt 'com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.0.21-1.0.1' konnte nicht aufgelöst werden)
Was ich versucht habe
- Ich habe sichergestellt, dass gradlePluginPortal() vorhanden ist Settings.gradle.kts.
- Ich habe den KSP-Plugin-Alias zu meinem Root-Build.gradle.kts hinzugefügt.
- Ich habe das KSP-Plugin und Room-Abhängigkeiten zu app/build.gradle.kts hinzugefügt.
- Ich habe die richtigen Versionen und Aliase zu hinzugefügt gradle/libs.versions.toml.
- Ich habe Caches ungültig gemacht und Android Studio mehrmals neu gestartet.
- Ich habe nach Netzwerk- oder Firewallproblemen gesucht. Andere Abhängigkeiten werden ohne Probleme heruntergeladen.
Code: Select all
gradle/libs.version.tomlCode: Select all
[versions]
agp = "8.13.2"
kotlin = "2.0.21"
coreKtx = "1.17.0"
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
lifecycleRuntimeKtx = "2.10.0"
activityCompose = "1.12.2"
composeBom = "2024.09.00"
navigationCompose = "2.9.6"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigationCompose" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Code: Select all
plugins {
alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}
Code: Select all
app/build.gradle.ktsCode: Select all
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
// ... (rest of the file is standard)
dependencies {
implementation(libs.androidx.core.ktx)
// ... other standard compose dependencies
implementation(libs.androidx.navigation.compose)
}
Code: Select all
app/build.gradle.ktsCode: Select all
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
android {
namespace = "com.example.officehelper"
compileSdk {
version = release(36)
}
defaultConfig {
applicationId = "com.example.officehelper"
minSdk = 34
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
compose = true
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.navigation.compose)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.androidx.compose.ui.test.manifest)
}
Mobile version