This message was deleted.
# android
s
This message was deleted.
t
which version of java are you using to build and which java version are you targetting also what version of compose are you using
n
JDK 11, Kotlin 1.6.10, Gradle 7.1.2, Compose 1.1.1 @Tower Guide
t
which android studio are you using? why not try using a more recent version of all these? we use
Android Studio Flamingo | 2022.2.1 Canary 11
Build #AI-222.4459.24.2221.9445173, built on December 30, 2022
Runtime version: 17.0.4.1+0-17.0.4.1b469.62-9127311 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
gradle.version.catalogs.dynamic.support=true
ide.images.show.chessboard=true
Non-Bundled Plugins:
com.android.aas (3.5.1)
com.jetbrains.kmm (0.5.1(222)-30)
with
Copy code
buildscript {
    ext {
        compose_version = '1.4.0-alpha02'
    }
}

plugins {
    id 'com.android.application' version '8.0.0-alpha11' apply false
    id 'com.android.library' version '8.0.0-alpha11' apply false
    id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
    id 'com.google.dagger.hilt.android' version '2.44.2' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
#Tue Oct 25 07:38:32 BST 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
and JDK17
n
Flamingo is not yet available in India; I use Chipmunk. I can try using higher versions of Java and Kotlin. Will update you. However, I created a sample project with my current versions, added compose and it worked. There could be some dependency conflict in my current project but the logs aren't helping. This issue is only happening when i add compose true
t
i didnt realise Android Studio versions were restricted 😞 does your JAVA_HOME, Gradle JDK and
Copy code
compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
    coreLibraryDesugaringEnabled true
}
kotlinOptions {
    jvmTarget = '17'
    freeCompilerArgs += [
            "-opt-in=androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi",
            "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi"]
}
all match?
n
Yes
Copy code
compileOptions {
    targetCompatibility JavaVersion.VERSION_11
    sourceCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
    jvmTarget = JavaVersion.VERSION_11.toString()
}
t
nice
and in Android Preferences the Gradle JDK???
n
yeah. 11 only