Android Studio Gradle Version Error On Apollo

Android Studio Gradle Version Error On Apollo


0

Hello i want to use this "https://studio.apollographql.com/public/star-wars-swapi/variant/current/home" star wars api, but when i want to download scheme from terminal i take this error.

Here my gradle app module;

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("com.apollographql.apollo3") version "3.8.2"
    id("com.google.dagger.hilt.android")
    kotlin("kapt")
    id("androidx.navigation.safeargs.kotlin")
}

apollo {
    service("service") {
        packageName.set("com.softcross.starwars")
    }
}

android {
    namespace = "com.softcross.starwars"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.softcross.starwars"
        minSdk = 24
        targetSdk = 34
        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_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {

    //Android Core
    implementation("androidx.core:core-ktx:1.12.0")

    //Android AppCompat
    implementation("androidx.appcompat:appcompat:1.6.1")

    // Material
    implementation("com.google.android.material:material:1.10.0")

    // Fragment
    implementation("androidx.fragment:fragment-ktx:1.6.2")

    // Picasso
    implementation("com.squareup.picasso:picasso:2.8")

    // Navigation Component
    implementation("androidx.navigation:navigation-fragment-ktx:2.7.5")
    implementation("androidx.navigation:navigation-ui-ktx:2.7.5")

    // Constraint Layout
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")

    // Retrofit
    implementation("com.squareup.retrofit2:retrofit:2.9.0")

    // ViewModel Ktx.
    implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")

    // Gson
    implementation("com.google.code.gson:gson:2.10.1")

    // Gson Converter Factory
    implementation("com.squareup.retrofit2:converter-gson:2.9.0")

    // Apollo
    implementation("com.apollographql.apollo3:apollo-runtime:3.8.2")

    // Hilt
    implementation("com.google.dagger:hilt-android:2.48")
    kapt("com.google.dagger:hilt-android-compiler:2.44")

    // Test
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}

here project gradle;

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id("com.android.application") version "8.1.0" apply false
    id("org.jetbrains.kotlin.android") version "1.8.0" apply false
    id("com.google.dagger.hilt.android") version "2.44" apply false
    id("androidx.navigation.safeargs.kotlin") version "2.6.0" apply false
}

Here error;
enter image description here

I try change jdk version, gradle version

New contributor

eren xd is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1


Load 7 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *