firebase / FirebaseUI-Android

Optimized UI components for Firebase
https://firebaseopensource.com/projects/firebase/firebaseui-android/
Apache License 2.0
4.63k stars 1.84k forks source link

ConstraintLayout Guidelines crash after introducing com.firebaseui:firebase-ui-auth:3.2.2 dependency #1221

Closed AndroidPat closed 6 years ago

AndroidPat commented 6 years ago

Describe the problem and Steps to reproduce:

The app crashes after adding implementation 'com.firebaseui:firebase-ui-auth:3.2.2' to the project. The erros comes from layouts where ConstraintLayout Guideline is used. The guidelines are used in the RecyclerView line item layouts and I use 'com.firebaseui:firebase-ui-firestore:3.2.2' to populate these views. Removing the guidelines solves the problem. The problem only occurs if implementation 'com.firebaseui:firebase-ui-auth:3.2.2' is present.

Observed Results:

Logcat Error:

E/AndroidRuntime: FATAL EXCEPTION: main Process: xxx.xxxx PID: 15057 java.lang.AssertionError: LEFT at android.support.constraint.solver.widgets.Guideline.getAnchor(Guideline.java:153) at android.support.constraint.solver.widgets.ConstraintWidget.immediateConnect(ConstraintWidget.java:1468) at android.support.constraint.ConstraintLayout.setChildrenConstraints(ConstraintLayout.java:979) at android.support.constraint.ConstraintLayout.updateHierarchy(ConstraintLayout.java:790) at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1288) at android.view.View.measure(View.java:21046) at android.support.v7.widget.RecyclerView$LayoutManager.measureChildWithMargins(RecyclerView.java:8994) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1585) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3529) at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1767) at android.support.v7.widget.RecyclerView$1.run(RecyclerView.java:356) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927) at android.view.Choreographer.doCallbacks(Choreographer.java:702) at android.view.Choreographer.doFrame(Choreographer.java:635) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

Relevant Code:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/divider">

<android.support.constraint.ConstraintLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_alignParentTop="true"
    android:layout_marginBottom="1dp"
    android:background="@color/main_background"
    android:orientation="horizontal"
    tools:layout_editor_absoluteX="0dp"
    tools:layout_editor_absoluteY="0dp">

    <ImageView
        android:id="@+id/profilePicturePost"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="5dp"
        android:layout_marginEnd="5dp"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="5dp"
        android:src="@drawable/profile"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/guideline2"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0"/>

    <android.support.constraint.Guideline
        android:id="@+id/guideline2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.2"/>

    <TextView
        android:id="@+id/tvCommentContent"
        android:layout_width="243dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:textColor="@color/white"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@+id/guideline2"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="I really love this article!"/>

    <TextView
        android:id="@+id/tvCommentAuthor"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="@+id/tvCommentContent"
        app:layout_constraintTop_toBottomOf="@+id/tvCommentContent"
        app:layout_constraintVertical_bias="0.557"
        tools:text="123123"/>

    <TextView
        android:id="@+id/tvCommentDate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        app:layout_constraintBottom_toBottomOf="@+id/tvCommentAuthor"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/tvCommentAuthor"
        app:layout_constraintTop_toTopOf="@+id/tvCommentAuthor"
        tools:text="26/03/2017"/>

</android.support.constraint.ConstraintLayout>

build.gradle

root: ext { compileSdkVersion = 27 supportLibVersion = "27.1.0" } app:

apply plugin: 'com.android.application'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    defaultConfig {
        applicationId "xxxxxx.xxxxx"
        minSdkVersion 17
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        resConfigs "en"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:support-annotations:${rootProject.ext.supportLibVersion}"
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:customtabs:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.firebaseui:firebase-ui-firestore:3.2.2'
    implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation('com.mikepenz:materialdrawer:6.0.6@aar') {
        transitive = true
    }
    implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
samtstern commented 6 years ago

What happens if you change your constraint-layout version to 1.1.0-beta5?

AndroidPat commented 6 years ago

Thank you for the quick response. I'm getting the same error with 1.1.0-beta5 and 1.1.0-beta6. I've also tried running the app with and without Instant Run enabled and using debug/release builds.

samtstern commented 6 years ago

@Buli1212 the thing is I don't see anything about FirebaseUI in that stack trace, and if FirebaseUI was presenting a dependency problem that would normally reveal itself at build time.

So when you take out FirebaseUI, are you still able to construct a recyclerview with an adapter where each item is a ConstraintLayout?

AndroidPat commented 6 years ago

As soon as I comment out implementation 'com.firebaseui:firebase-ui-auth:3.2.2' the app starts working again. I have not started using the UI Auth functionality in this project yet so that's the only change.

samtstern commented 6 years ago

@Buli1212 thanks! I am gonna run an experiment and try to narrow this down

samtstern commented 6 years ago

:app:androidDependencies with FirebaseUI:

releaseCompileClasspath - Dependencies for compilation
+--- com.firebaseui:firebase-ui-auth:3.2.2@aar
+--- com.android.support:design:27.1.0@aar
+--- com.android.support:customtabs:27.1.0@aar
+--- com.android.support:appcompat-v7:27.1.0@aar
+--- com.firebaseui:firebase-ui-firestore:3.2.2@aar
+--- com.android.support:recyclerview-v7:27.1.0@aar
+--- com.squareup.picasso:picasso:2.71828@aar
+--- com.android.support:animated-vector-drawable:27.1.0@aar
+--- com.google.firebase:firebase-database:11.8.0@aar
+--- com.google.firebase:firebase-database-connection:11.8.0@aar
+--- com.google.firebase:firebase-firestore:11.8.0@aar
+--- com.google.firebase:firebase-auth:11.8.0@aar
+--- com.google.firebase:firebase-common:11.8.0@aar
+--- com.google.android.gms:play-services-auth:11.8.0@aar
+--- com.google.android.gms:play-services-auth-api-phone:11.8.0@aar
+--- com.google.android.gms:play-services-auth-base:11.8.0@aar
+--- com.google.android.gms:play-services-base:11.8.0@aar
+--- com.google.android.gms:play-services-tasks:11.8.0@aar
+--- com.google.android.gms:play-services-basement:11.8.0@aar
+--- com.android.support:support-v4:27.1.0@aar
+--- android.arch.lifecycle:extensions:1.1.0@aar
+--- com.android.support:support-fragment:27.1.0@aar
+--- com.android.support:support-core-ui:27.1.0@aar
+--- com.android.support:support-core-utils:27.1.0@aar
+--- com.android.support:support-vector-drawable:27.1.0@aar
+--- com.android.support:support-media-compat:27.1.0@aar
+--- com.android.support:transition:27.1.0@aar
+--- com.android.support:support-compat:27.1.0@aar
+--- com.firebaseui:firebase-ui-common:3.2.2@aar
+--- com.android.support:exifinterface:27.1.0@aar
+--- android.arch.lifecycle:viewmodel:1.1.0@aar
+--- android.arch.lifecycle:runtime:1.1.0@aar
+--- android.arch.lifecycle:livedata:1.1.0@aar
+--- android.arch.lifecycle:livedata-core:1.1.0@aar
+--- android.arch.core:runtime:1.1.0@aar
+--- android.arch.core:common:1.1.0@jar
+--- android.arch.lifecycle:common:1.1.0@jar
+--- com.android.support:cardview-v7:27.1.0@aar
+--- com.android.support:support-annotations:27.1.0@jar
+--- com.android.support.constraint:constraint-layout:1.1.0-beta5@aar
+--- com.mikepenz:materialdrawer:6.0.6@aar
+--- com.android.support.constraint:constraint-layout-solver:1.1.0-beta5@jar
+--- com.google.firebase:firebase-database-license:11.8.0@aar
+--- com.squareup.okhttp3:okhttp:3.10.0@jar
+--- com.mikepenz:materialize:1.1.2@aar
+--- com.mikepenz:iconics-core:3.0.2@aar
+--- com.mikepenz:fastadapter:3.2.4@aar
+--- com.mikepenz:fastadapter-extensions-expandable:3.2.4@aar
+--- com.google.firebase:firebase-database-connection-license:11.8.0@aar
+--- com.google.android.gms:play-services-basement-license:11.8.0@aar
+--- com.google.firebase:firebase-common-license:11.8.0@aar
+--- com.google.android.gms:play-services-tasks-license:11.8.0@aar
+--- com.squareup.okhttp:okhttp:2.7.2@jar
+--- com.google.firebase:firebase-auth-license:11.8.0@aar
+--- com.squareup.okio:okio:1.14.0@jar
+--- com.google.android.gms:play-services-base-license:11.8.0@aar
+--- com.google.android.gms:play-services-auth-api-phone-license:11.8.0@aar
\--- com.google.android.gms:play-services-auth-base-license:11.8.0@aar

:app:androidDependencies without FirebaseUI:

releaseCompileClasspath - Dependencies for compilation
+--- com.android.support:design:27.1.0@aar
+--- com.android.support:customtabs:27.1.0@aar
+--- com.android.support:appcompat-v7:27.1.0@aar
+--- com.firebaseui:firebase-ui-firestore:3.2.2@aar
+--- com.android.support:recyclerview-v7:27.1.0@aar
+--- com.android.support:cardview-v7:27.1.0@aar
+--- com.squareup.picasso:picasso:2.71828@aar
+--- com.google.firebase:firebase-database:11.8.0@aar
+--- com.google.firebase:firebase-database-connection:11.8.0@aar
+--- com.google.firebase:firebase-firestore:11.8.0@aar
+--- com.google.firebase:firebase-common:11.8.0@aar
+--- com.google.android.gms:play-services-tasks:11.8.0@aar
+--- com.google.android.gms:play-services-basement:11.8.0@aar
+--- com.android.support:support-v4:27.1.0@aar
+--- com.android.support:support-fragment:27.1.0@aar
+--- com.android.support:animated-vector-drawable:27.1.0@aar
+--- com.android.support:support-core-ui:27.1.0@aar
+--- com.android.support:support-core-utils:27.1.0@aar
+--- com.android.support:support-vector-drawable:27.1.0@aar
+--- com.android.support:transition:27.1.0@aar
+--- com.android.support:support-media-compat:27.1.0@aar
+--- com.android.support:support-compat:27.1.0@aar
+--- com.firebaseui:firebase-ui-common:3.2.2@aar
+--- com.android.support:exifinterface:27.1.0@aar
+--- android.arch.lifecycle:viewmodel:1.1.0@aar
+--- android.arch.lifecycle:runtime:1.1.0@aar
+--- android.arch.lifecycle:livedata-core:1.1.0@aar
+--- android.arch.lifecycle:common:1.1.0@jar
+--- android.arch.core:runtime:1.1.0@aar
+--- android.arch.core:common:1.1.0@jar
+--- com.android.support:support-annotations:27.1.0@jar
+--- com.android.support.constraint:constraint-layout:1.0.2@aar
+--- com.mikepenz:materialdrawer:6.0.6@aar
+--- com.android.support.constraint:constraint-layout-solver:1.0.2@jar
+--- com.google.firebase:firebase-database-license:11.8.0@aar
+--- com.squareup.okhttp3:okhttp:3.10.0@jar
+--- com.mikepenz:materialize:1.1.2@aar
+--- com.mikepenz:iconics-core:3.0.2@aar
+--- com.mikepenz:fastadapter:3.2.4@aar
+--- com.mikepenz:fastadapter-extensions-expandable:3.2.4@aar
+--- com.google.firebase:firebase-database-connection-license:11.8.0@aar
+--- com.google.android.gms:play-services-basement-license:11.8.0@aar
+--- com.google.firebase:firebase-common-license:11.8.0@aar
+--- com.google.android.gms:play-services-tasks-license:11.8.0@aar
+--- com.squareup.okhttp:okhttp:2.7.2@jar
\--- com.squareup.okio:okio:1.14.0@jar
samtstern commented 6 years ago

Here's the dependency diff (took the above and cleaned it): http://www.mergely.com/XvueGU3P/

Here's what changes when you add FirebaseUI;

samtstern commented 6 years ago

@Buli1212 I know you said you already tried this but are you sure it still works if you add this to your deps and then do a full clean build?:

compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
compile 'com.android.support.constraint:constraint-layout-solver:1.1.0-beta5'
AndroidPat commented 6 years ago

I left 'com.firebaseui:firebase-ui-auth:3.2.2' commented out and changed 'com.android.support.constraint:constraint-layout:1.0.2' to implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5' and the project crashed with the same error so it's the constraint layout problem and has nothing to do with the Firebase. I will need to find out what has been changed between 1.0.2 and 1.1. Thank you very much for your time and pointing me in the right direction !

samtstern commented 6 years ago

Glad it worked out, thanks for the patience!

On Tue, Mar 27, 2018, 5:06 PM Buli1212 notifications@github.com wrote:

Closed #1221 https://github.com/firebase/FirebaseUI-Android/issues/1221.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/firebase/FirebaseUI-Android/issues/1221#event-1544484202, or mute the thread https://github.com/notifications/unsubscribe-auth/AIEw6imijtA21m2AUPjO13AK8TDogdL3ks5titQggaJpZM4S9vqG .

hereisderek commented 6 years ago

same error happened to me, full log as below implementation "com.android.support.constraint:constraint-layout:1.1.0"

    Process: com.example.derek.trademeapi, PID: 14475
    java.lang.AssertionError: LEFT
        at android.support.constraint.solver.widgets.Guideline.getAnchor(Guideline.java:159)
        at android.support.constraint.solver.widgets.ConstraintWidget.immediateConnect(ConstraintWidget.java:1578)
        at android.support.constraint.ConstraintLayout.setChildrenConstraints(ConstraintLayout.java:978)
        at android.support.constraint.ConstraintLayout.updateHierarchy(ConstraintLayout.java:793)
        at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1540)
        at android.view.View.measure(View.java:22944)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6729)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at android.support.v7.widget.CardView.onMeasure(CardView.java:258)
        at android.view.View.measure(View.java:22944)
        at android.support.v7.widget.RecyclerView$LayoutManager.measureChildWithMargins(RecyclerView.java:8994)
        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1585)
        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
        at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812)
        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3529)
        at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4082)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:132)
        at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
        at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1361)
        at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:894)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1790)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1634)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1543)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1790)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1634)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1543)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at com.android.internal.policy.DecorView.onLayout(DecorView.java:757)
        at android.view.View.layout(View.java:20449)
        at android.view.ViewGroup.layout(ViewGroup.java:6174)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2761)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2288)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1441)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7076)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:935)
        at android.view.Choreographer.doCallbacks(Choreographer.java:747)
        at android.view.Choreographer.doFrame(Choreographer.java:682)
2018-05-02 01:32:23.588 14475-14475/? E/AndroidRuntime:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:921)
        at android.os.Handler.handleCallback(Handler.java:819)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
hereisderek commented 6 years ago
debug
debugCompileClasspath - Dependencies for compilation
+--- com.android.databinding:adapters:3.2.0-alpha12@aar
+--- com.android.databinding:library:3.2.0-alpha12@aar
+--- com.android.databinding:baseLibrary:3.2.0-alpha12@jar
+--- com.squareup.leakcanary:leakcanary-android:1.5.4@aar
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.41@jar
+--- com.squareup.moshi:moshi-kotlin:1.5.0@jar
+--- org.jetbrains.kotlin:kotlin-reflect:1.2.41@jar
+--- androidx.core:core-ktx:0.3@aar
+--- com.android.support.constraint:constraint-layout:1.1.0@aar
+--- com.android.support:cardview-v7:27.1.1@aar
+--- com.google.dagger:dagger-android-support:2.15@aar
+--- com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:2.1.1@aar
+--- com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1@aar
+--- com.jakewharton.rxbinding2:rxbinding-design-kotlin:2.1.1@aar
+--- com.jakewharton.rxbinding2:rxbinding-design:2.1.1@aar
+--- com.android.support:design:27.1.1@aar
+--- com.android.support:appcompat-v7:27.1.1@aar
+--- com.android.support:gridlayout-v7:27.1.1@aar
+--- com.android.support:support-v13:27.1.1@aar
+--- com.android.support:support-v4:27.1.1@aar
+--- com.android.support:animated-vector-drawable:27.1.1@aar
+--- com.github.bumptech.glide:glide:4.7.1@aar
+--- com.android.support:support-fragment:27.1.1@aar
+--- com.android.support:recyclerview-v7:27.1.1@aar
+--- com.android.support:support-core-ui:27.1.1@aar
+--- com.android.support:support-core-utils:27.1.1@aar
+--- com.jakewharton.timber:timber:4.7.0@aar
+--- com.jakewharton.rxbinding2:rxbinding-kotlin:2.1.1@aar
+--- com.jakewharton.rxbinding2:rxbinding:2.1.1@aar
+--- io.reactivex.rxjava2:rxandroid:2.0.2@aar
+--- com.squareup.retrofit2:adapter-rxjava2:2.4.0@jar
+--- io.reactivex.rxjava2:rxjava:2.1.13@jar
+--- com.google.dagger:dagger-android:2.15@aar
+--- com.google.dagger:dagger:2.15@jar
+--- com.squareup.okhttp3:logging-interceptor:3.10.0@jar
+--- com.squareup.retrofit2:converter-moshi:2.4.0@jar
+--- com.squareup.retrofit2:retrofit:2.4.0@jar
+--- com.squareup.okhttp3:okhttp:3.10.0@jar
+--- com.android.support:support-media-compat:27.1.1@aar
+--- com.android.support:support-vector-drawable:27.1.1@aar
+--- com.android.support:transition:27.1.1@aar
+--- com.android.support:support-compat:27.1.1@aar
+--- android.arch.lifecycle:runtime:1.1.0@aar
+--- com.squareup.leakcanary:leakcanary-analyzer:1.5.4@aar
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.41@jar
+--- org.jetbrains.kotlin:kotlin-stdlib:1.2.41@jar
+--- com.github.bumptech.glide:gifdecoder:4.7.1@aar
+--- android.arch.lifecycle:livedata-core:1.1.0@aar
+--- android.arch.lifecycle:common:1.1.0@jar
+--- android.arch.core:runtime:1.1.0@aar
+--- android.arch.core:common:1.1.0@jar
+--- com.android.support:support-annotations:27.1.1@jar
+--- com.android.support.constraint:constraint-layout-solver:1.1.0@jar
+--- com.github.bumptech.glide:disklrucache:4.7.1@jar
+--- com.github.bumptech.glide:annotations:4.7.1@jar
+--- javax.inject:javax.inject:1@jar
+--- com.squareup.moshi:moshi:1.5.0@jar
+--- com.squareup.okio:okio:1.14.0@jar
+--- com.squareup.leakcanary:leakcanary-watcher:1.5.4@jar
+--- com.squareup.haha:haha:2.0.3@jar
+--- org.jetbrains:annotations:13.0@jar
+--- org.reactivestreams:reactive-streams:1.0.2@jar
\--- android.arch.lifecycle:viewmodel:1.1.0@aar

layout.xml is a view holder for a recyclerview

<?xml version="1.0" encoding="utf-8"?>

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

        <variable
            name="listing"
            type="com.example.derek.trademeapi.model.Listing" />
    </data>

    <android.support.v7.widget.CardView
        android:id="@+id/card_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        app:cardCornerRadius="4dp">

        <android.support.constraint.ConstraintLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">

            <ImageView
                android:id="@+id/item_image_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="90dp"
                android:minHeight="90dp"
                android:scaleType="fitXY"
                app:imageUrl="@{listing.pictureHref}"
                app:layout_constraintBottom_toTopOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent" />

            <android.support.constraint.Guideline
                android:id="@+id/item_text_guide_line"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintBottom_toTopOf="@id/item_id_text_view"
                app:layout_constraintLeft_toLeftOf="@id/item_image_view"
                app:layout_constraintRight_toRightOf="@id/item_image_view"
                />

            <TextView
                android:id="@+id/item_id_text_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="40dp"
                android:text="@{Integer.toString(listing.listingId)}"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/item_text_guide_line" />

            <TextView
                android:id="@+id/item_title_text_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{listing.title}"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintRight_toRightOf="@id/item_id_text_view"
                app:layout_constraintTop_toBottomOf="@+id/item_text_guide_line" />

        </android.support.constraint.ConstraintLayout>

        <TextView
            android:id="@+id/info_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </android.support.v7.widget.CardView>

</layout>
hereisderek commented 6 years ago

sorry, wrong place to be, google got me here, didn't notice it was firebase repo

marcelpinto commented 6 years ago

We had same issue, here I explain it https://stackoverflow.com/a/50760933/1695078