Cannot build the project when the Firebase auth dependency is added.
compile as we're using older Gradle version)compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:customtabs:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.google.android.gms:play-services-gcm:11.6.2'
compile 'com.google.firebase:firebase-core:11.6.2'
compile 'com.google.firebase:firebase-messaging:11.6.2'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.firebaseui:firebase-ui-auth:3.1.2'
The project build fails with following error:
(...)/app/build/intermediates/res/merged/dev/homologation/layout/fui_phone_layout.xml
Error:(16, 57) No resource found that matches the given name (at 'layout_constraintBaseline_toBaselineOf' with value '@id/phone_layout').
The app to build
gradle-wrapper.properties
#Mon Dec 18 18:10:48 BRST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
build.gradle
```buildscript {
repositories {
jcenter()
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-services:3.1.2'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
dependencies { classpath "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1" }
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
}
`app/build/intermediates/res/merged/dev/homologation/layout/fui_phone_layout.xml`
style="@style/FirebaseUI.CountrySpinner"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/phone_layout" />
```
Ah, when I updated Gradle build tools (which we should've done a long time ago) from 2.2.3 to 3.0.1, the build has passed.
I guess the issue can be closed, seems it's not an issue with Firebase UI Auth.
So when I updated several libraries it went through, but I had a problem with another library (https://github.com/castorflex/SmoothProgressBar/issues/98). When I apply the suggested quick fix from there and add android.enableAapt2=false to gradle.properties, I keep getting the same error in fui_phone_layout.xml.
May it be related to aapt version then?
Yeap, we're getting the exact same error here:
`~/.android/build-cache/e5cf555b8b994d795100e0949aff2be1ef12dc95/output/res/layout/fui_phone_layout.xml:16:57-73: AAPT: No resource found that matches the given name (at 'layout_constraintBaseline_toBaselineOf' with value '@id/phone_layout').
~/git/MyApp/mobile/build/intermediates/res/merged/backstage/release/layout/fui_phone_layout.xml:12: error: Error: No resource found that matches the given name (at 'layout_constraintBaseline_toBaselineOf' with value '@id/phone_layout').
`
supportLibVersion = '27.0.2'
playServicesLibVersion = '11.6.2'
firebaseUILibVersion = '3.1.2'
Hi all. Looking into this issue, can you try with 3.1.0 and see if the
problem persists?
On Tue, Dec 19, 2017, 7:11 PM Dimi Paun notifications@github.com wrote:
Yeap, we're getting the exact same error here:
`~/.android/build-cache/e5cf555b8b994d795100e0949aff2be1ef12dc95/output/res/layout/fui_phone_layout.xml:16:57-73:
AAPT: No resource found that matches the given name (at
'layout_constraintBaseline_toBaselineOf' with value '').~/git/MyApp/mobile/build/intermediates/res/merged/backstage/release/layout/fui_phone_layout.xml:12:
error: Error: No resource found that matches the given name (at
'layout_constraintBaseline_toBaselineOf' with value '').
`
supportLibVersion = '27.0.2'
playServicesLibVersion = '11.6.2'
firebaseUILibVersion = '3.1.2'—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/FirebaseUI-Android/issues/1064#issuecomment-352952799,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIEw6n7InBqcUZZudQaHrGinbf_ahk8zks5tCHr3gaJpZM4RG5mH
.
@samtstern we've been using 3.1.0 for a long time now (since its release), that one works great.
However, 3.1.1 was broken for us, we were looking forward to 3.1.2 :)
@samtstern same thing as with @dimipaun, 3.1.0 was fine (except one NPE which you fixed in 3.1.1), 3.1.1 was showing the same build error (when I added necessary libraries), 3.1.2 of course shows it too :)
Ok I can confirm this issue when I use 'com.android.tools.build:gradle:2.3.3' but not when I use 'com.android.tools.build:gradle:3.0.1'.
Now I will try and figure out if this is my fault or something with the support libs / gradle plugin.
Ok looking into the problematic layouts you see some constraints like this:
app:layout_constraintBaseline_toBaselineOf="@id/phone_layout"
The thing is that the layout it is constrained to is defined like this (below it):
<com.firebase.ui.auth.util.ui.BaselineTextInputLayout
android:id="@+id/phone_layout"
I think this may come from using the @id form versus the @+id form for a layout defined sequentially later? But that shouldn't be the case...
Alright my theory was correct and I have a fix:
https://github.com/firebase/FirebaseUI-Android/pull/1067
But I am not convinced the fix is a good idea. Would love for someone who knows more about constraint layout to help me out here.
The fix for this will be in version 3.1.3. The known workaround is to use gradle build tool 3.0.0+ with aapt2 enabled (which is default).
Thanks @samtstern! Unfortunately we can't use aapt2 because of https://github.com/castorflex/SmoothProgressBar/issues/98, but we'll just wait for 3.1.3 release then.
@jzurek if you want to unblock yourself right now, you can just do the following:
version-3.1.3-dev./gradlew :library:prepareArtifacts :library:publishAllToMavenLocalrepositories { mavenLocal() } to your build.gradle3.1.3-SNAPSHOTThis should be super safe since the only thing on the 3.1.3 branch that's not on master is the fix for this issue.
@samtstern and @jzurek Thanks!
I was also facing same issue with FirebaseUI-Auth version 3.1.2, However When I changed to version 3.1.0 It is working fine now.
@samtstern
3.1.0 and 3.0.0 not working for me, any suggestions
This has been fixed and released in 3.1.3.
I am using 3.1.3 but still issue is not resolved
Most helpful comment
@jzurek if you want to unblock yourself right now, you can just do the following:
version-3.1.3-dev./gradlew :library:prepareArtifacts :library:publishAllToMavenLocalrepositories { mavenLocal() }to yourbuild.gradle3.1.3-SNAPSHOTThis should be super safe since the only thing on the
3.1.3branch that's not on master is the fix for this issue.