GitLiveApp / firebase-kotlin-sdk

A Kotlin-first SDK for Firebase
https://gitliveapp.github.io/firebase-kotlin-sdk/
Apache License 2.0
979 stars 148 forks source link

Could not find android.arch.lifecycle:common:1.1.1 #503

Closed AhmedTawfek closed 1 month ago

AhmedTawfek commented 1 month ago

Iam getting this error when trying to run the app on the desktop, however it works fine on the android:

Could not resolve all files for configuration ':composeApp:desktopTestRuntimeClasspath'. Could not find android.arch.lifecycle:common:1.1.1. Searched in the following locations:

This is my build.gradle.kts file:

 androidMain.dependencies {
            implementation(project.dependencies.platform("com.google.firebase:firebase-bom:32.8.1"))
            implementation("com.google.firebase:firebase-auth")
            implementation("com.google.firebase:firebase-firestore")
            implementation("com.google.firebase:firebase-storage")
        }
commonMain.dependencies {
            // Firebase SDK
            implementation("dev.gitlive:firebase-auth:1.12.0")
            implementation("dev.gitlive:firebase-firestore:1.12.0")
            implementation("dev.gitlive:firebase-storage:1.12.0")
            implementation("dev.gitlive:firebase-common:1.12.0")
}
desktopMain.dependencies {
            implementation(compose.desktop.currentOs)
            implementation("io.ktor:ktor-client-apache5:2.3.10")
}
AhmedTawfek commented 1 month ago

The problem that it was searching for android.arch.lifecycle:common:1.1.1. in the wrong place, so i have edited the settings.gradle.kts file from: pluginManagement { repositories { google { mavenContent { includeGroupAndSubgroups("androidx") includeGroupAndSubgroups("com.android") includeGroupAndSubgroups("com.google") } } mavenCentral() gradlePluginPortal() } }

To this : pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() } }