constraintlayout icon indicating copy to clipboard operation
constraintlayout copied to clipboard

Cannot use androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01 in Jetpack Compose

Open anthoninCL opened this issue 4 years ago • 1 comments

Hello,

I'm currently trying to use ConstraintLayout in my Jetpack Compose project and I'm facing an issue with the implementation of the dependency. I'm not finding any support on my issue so I guess it's possible to ask here.

I'm simply trying to add the androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01 dependency in my project. When I rebuild the app, I get an error java.lang.IllegalStateException: function = <anonymous>, count = 4, index = 4.

Here are my others dependencies:

    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation "androidx.compose.ui:ui:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.ui:ui-tooling:$compose_version"
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-alpha06'
    implementation 'androidx.activity:activity-compose:1.3.0-alpha06'
    implementation "androidx.navigation:navigation-compose:1.0.0-alpha09"
    implementation "androidx.compose.material:material-icons-extended:$compose_version"
    implementation "androidx.compose.material:material-ripple:$compose_version"
    implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
    implementation "androidx.transition:transition-ktx:1.4.1"
    implementation "androidx.datastore:datastore-preferences:1.0.0-alpha01"
    implementation 'com.github.nkzawa:socket.io-client:0.6.0'
    implementation 'com.loopj.android:android-async-http:1.4.9'
    implementation 'com.squareup.retrofit2:retrofit:2.6.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
    implementation 'com.squareup.retrofit2:converter-moshi:2.6.0'
    implementation 'com.squareup.okhttp3:okhttp:2.6.4'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
    implementation 'com.google.zxing:core:3.3.0'
    implementation 'net.danlew:android.joda:2.10.2'
    implementation "com.github.vicpinm:krealmextensions:2.5.0"
    implementation 'com.google.android.gms:play-services-maps:17.0.1'
    implementation "com.google.android.libraries.maps:maps:3.1.0-beta"
    implementation "com.google.maps.android:maps-v3-ktx:2.2.0"
    implementation "androidx.fragment:fragment-ktx:1.3.2"
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation "com.google.accompanist:accompanist-pager:0.8.0"
    implementation "com.google.accompanist:accompanist-pager-indicators:0.8.1"
    implementation 'com.google.android.gms:play-services-analytics:17.0.1'

and my compose version is 1.0.0-beta04.

Any help is welcome, thanks!

anthoninCL avatar Dec 02 '21 15:12 anthoninCL

We have no idea. Our guess is some type of "Dimond dependency". Some library you are including depends on ConstraintLayout. You must have matching ConstraintLayouts (ConstraintLayout and ConstraintLayoutCompose) because both depend on ConstraintLayout-Core.

jafu888 avatar Dec 07 '21 17:12 jafu888