GitLiveApp / firebase-kotlin-sdk

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

Cannot access class 'dev.gitlive.firebase.storage.Data' in androidApp #638

Open mr-kew opened 1 day ago

mr-kew commented 1 day ago

I have a function in commonMain:

import dev.gitlive.firebase.storage.Data
...
fun getData(): Data {
    ...
}

and I am trying to call it from a androidApp (from compose):

Button(
    onClick = {
        val data = getData()
        ...
    }
)

but this gives me an error: Cannot access class 'dev.gitlive.firebase.storage.Data'. Check your module classpath for missing or conflicting dependencies..

I am doing just this in my :shared:build.gradle.kts:

commonMain.dependencies {
    implementation("dev.gitlive:firebase-storage:2.1.0")
}

I tried in commonMain:

public typealias StorageData = Data

but that basically tells me that type StorageData and dev.gitlive.firebase.storage.Data are not the same in androidApp.

Am I doing something wrong? Or is it an issue with the library?