skip to Main Content

Required:
androidx.compose.foundation.lazy.GridCells

Found:
androidx.compose.foundation.lazy.grid.GridCells

for use with ReactionsPicker… a file from Stream Chat library
ReactionsPicker call is in MessagesActivity
”’
is SelectedMessageReactionsPickerState -> {
val gcells=GridCells.Fixed(5) // I added this. cells is defined in file
ReactionsPicker(
cells= gcells,
modifier = Modifier
.align(Alignment.Center)
.padding(horizontal = 20.dp)
.wrapContentSize(),
shape = ChatTheme.shapes.attachment,
message = selectedMessage,
onMessageAction = { action ->
composerViewModel.performMessageAction(action)
listViewModel.performMessageAction(action)
},
onDismiss = { listViewModel.removeOverlay() }
)
}”’

I have gridcells, but not the right one? pretty sure its in lazy foundation
compose_version = ‘1.3.0-alpha01’

'''    
dependencies {

    implementation 'androidx.core:core-ktx:1.8.0'
    implementation "androidx.compose.ui:ui:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
    implementation "androidx.compose.foundation:foundation:$compose_version"
    androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
    debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
    implementation 'androidx.activity:activity-compose:1.5.0'

    implementation "androidx.compose.material:material-icons-extended:$compose_version"
    implementation('io.github.raamcosta.compose-destinations:core:1.5.12-beta')
    ksp('io.github.raamcosta.compose-destinations:ksp:1.6.12-beta')
// Paging 3.0
    implementation 'androidx.paging:paging-compose:1.0.0-alpha15'
    implementation "androidx.room:room-paging:2.4.2"
    //hilt
    implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
    implementation "com.google.dagger:hilt-android:2.42"
    kapt "com.google.dagger:hilt-compiler:2.42"
    
    implementation 'androidx.fragment:fragment-ktx:1.5.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.0'
   
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutines_version"

    implementation platform('com.google.firebase:firebase-bom:30.2.0')
    //implementation 'com.google.firebase:firebase-common-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.firebaseui:firebase-ui-database:8.0.1'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'
    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'com.google.android.material:material:1.6.1'
    implementation 'com.google.firebase:firebase-auth-ktx:21.0.6'

    implementation "com.google.firebase:firebase-crashlytics:"



    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    
    //implementation("androidx.compose.compiler:compiler:")
    
    
    implementation 'com.github.bumptech.glide:glide:4.13.2'
    kapt 'com.github.bumptech.glide:compiler:4.13.2'

    implementation "androidx.room:room-ktx:$room_version"
    //implementation "androidx.room:room-runtime:$room_version"
    kapt "androidx.room:room-compiler:$room_version"
    //implementation "androidx.compose.compiler:compiler:1.2.0"
  
    //Pager
    implementation "com.google.accompanist:accompanist-pager:0.23.0"
    implementation "com.google.accompanist:accompanist-pager-indicators:0.13.0"
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    // optional - RxJava2 support for Room
    //implementation "androidx.room:room-rxjava2:$room_version"

    // optional - RxJava3 support for Room
    //implementation "androidx.room:room-rxjava3:$room_version"

    // optional - Guava support for Room, including Optional and ListenableFuture
    //implementation "androidx.room:room-guava:$room_version"

    // optional - Test helpers
    testImplementation "androidx.room:room-testing:$room_version"



    //////STREAM CHAT 
    implementation 'io.getstream:stream-chat-android-compose:5.5.0'
//coil
    implementation "io.coil-kt:coil:$coil_version"
    implementation "io.coil-kt:coil-gif:$coil_version"
    implementation "io.coil-kt:coil-video:$coil_version"
    implementation "io.coil-kt:coil-compose:$coil_version"

    //implementation "androidx.compose.material:material-icons-extended:$compose_version"

    // optional - Paging 3 Integration
   //implementation "androidx.room:room-paging:2.5.0-alpha02"
//ROOM
    implementation "androidx.room:room-runtime:2.4.2"
    //kapt "androidx.room:room-compiler:2.4.2"
    //implementation "androidx.room:room-ktx:2.4.2"
    
   
    implementation 'com.google.code.gson:gson:2.9.0'
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3"

    implementation("com.squareup.moshi:moshi:1.13.0")
    kapt("com.squareup.moshi:moshi-kotlin-codegen:1.13.0")
    
    implementation('com.google.devtools.ksp:symbol-processing-api:1.7.10-1.0.6')
}'''

3

Answers


  1. According to their Compose chat tutorial, they highly recommend using Compose 1.1.1. They don’t support Compose 1.2.0~1.3.0-alpha01 yet, so if you change Compose version to 1.1.1, it will work well.

    Login or Signup to reply.
  2. The package has been updated from

    androidx.compose.foundation.lazy
    

    to

    androidx.compose.foundation.lazy.grid
    

    Thus you need to import:

    androidx.compose.foundation.lazy.grid.LazyVerticalGrid
    
    Login or Signup to reply.
  3. Your error should be resolved with

    implementation "androidx.compose.foundation:foundation:1.3.1" in gradle file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search