Closed AndroidPat closed 6 years ago
What happens if you change your constraint-layout
version to 1.1.0-beta5
?
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.
@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?
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.
@Buli1212 thanks! I am gonna run an experiment and try to narrow this down
: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
Here's the dependency diff (took the above and cleaned it): http://www.mergely.com/XvueGU3P/
Here's what changes when you add FirebaseUI;
constraint-layout
and constraint-layout-solver
go to 1.1.0-beta5
from 1.0.2
play-services-auth
, -auth-api-phone
, -auth-base
, -base
, and their -license
dependencies.firebase-auth
and firebase-auth-license
@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'
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 !
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 .
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)
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>
sorry, wrong place to be, google got me here, didn't notice it was firebase repo
We had same issue, here I explain it https://stackoverflow.com/a/50760933/1695078
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">
build.gradle
root: ext { compileSdkVersion = 27 supportLibVersion = "27.1.0" } app: