最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Integration issue : Supabase to my Android - Kotlin - Stack Overflow

programmeradmin5浏览0评论

I am trying to use Supabase but the build is consistently failing but succeeding when I remove supabase related dependencies and code.

The error I am getting is : Unable to read Kotlin metadata due to unsupported metadata kind: null.

My gradle file is as the following :

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlinpose)
kotlin("plugin.serialization") version "2.0.0" // No change
id("kotlin-kapt")
id("com.google.gms.google-services")
}

android {
namespace = "com.example.fl_5"
compileSdk = 35

defaultConfig {
    applicationId = "com.example.fl_5"
    minSdk = 26
    targetSdk = 35
    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" // No change
 }

 buildFeatures {
    compose = true // No change
}
}

dependencies {
implementation(libs.androidx.core.ktx) // No change
implementation(libs.androidx.lifecycle.runtime.ktx) // No change
implementation(libs.androidx.activitypose) // No change
implementation(platform(libs.androidxpose.bom)) // No change
implementation(libs.androidx.ui) // No change
implementation(libs.androidx.ui.graphics) // No change
implementation(libs.androidx.ui.tooling.preview) // No change
implementation(libs.androidx.material3) // No change

// Navigation and Room dependencies
implementation("androidx.navigation:navigation-compose:2.7.5") 
implementation("androidx.room:room-runtime:2.6.1") 
kapt("androidx.room:room-compiler:2.6.1") 

// Firebase dependencies
implementation(platform("com.google.firebase:firebase-bom:33.10.0")) // No change
implementation("com.google.firebase:firebase-analytics") // No change

// Coil for image loading
implementation("io.coil-kt:coil-compose:2.5.0") // No change

// Supabase Integration - using the latest BOM version for Supabase libraries
implementation(platform("io.github.jan-tennert.supabase:bom:3.1.3")) 
implementation("io.github.jan-tennert.supabase:postgrest-kt") // No change
implementation("io.github.jan-tennert.supabase:auth-kt") // No change

// Ktor Client - updated to the latest version compatible with Kotlin 2.0.0
implementation("io.ktor:ktor-client-android:3.0.0") 


implementation(".jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") 
implementation(".jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") 

// Serialization (required for Supabase)
implementation(".jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") 
// Testing dependencies - no changes here.
testImplementation(libs.junit) // No change
androidTestImplementation(libs.androidx.junit) // No change
}

I tried updating the supabase and ktor dependencies.

发布评论

评论列表(0)

  1. 暂无评论