Welcome to FirebaseUI and thanks for submitting an issue!
Cannot build the project when the Firebase auth dependency is added

build.gradleimplementation 'com.firebaseui:firebase-ui-auth:3.1.1' to app/build.gradleError:resource style/Widget.Design.TextInputLayout (aka com.blundell.authtest:style/Widget.Design.TextInputLayout) not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
The app to build
app/build.gradle
```
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.blundell.authtest"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
// Comment this in to cause the error
// implementation 'com.firebaseui:firebase-ui-auth:3.1.1'
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'
}
```
/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle-wrapper.properties
#Sat Dec 16 11:46:51 GMT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
The problem is that firebase-ui-auth makes use of the new Barrier view that was introduced in constraint-layout 1.1:
https://developer.android.com/reference/android/support/constraint/Barrier.html
However, firebase-ui-auth doesn't force a transitive dependency on that. So, if you're using the latest full release of constraint-layout that comes with new projects (1.0.2), you'll get build errors. To get past the build errors, this can be added to the app:
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta3'
But I'm not really a big fan of putting beta software in my production app, you know? :-)
@samtstern
@CodingDoug That would be my fault. However, it isn't a ConstraintLayout issue—we somehow aren't distributing that dependency properly (Gradle should be upgrading people). As for the beta concerns, the CL folks have done an amazing job of ensuring a super stable experience though I do agree that betas in a library usually aren't a good idea. 😄
@samtstern I just checked our POM file and we've messed it up pretty bad, none of our internal dependencies our being passed on to gradle. Here's a good POM file from LicenseAdapter:
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>recyclerview-v7</artifactId>
<version>27.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>27.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.android.support.constraint</groupId>
<artifactId>constraint-layout</artifactId>
<version>1.1.0-beta3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>customtabs</artifactId>
<version>27.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>android.arch.lifecycle</groupId>
<artifactId>extensions</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
And here's ours:
<dependencies>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-auth</artifactId>
<version>11.6.2</version>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-auth</artifactId>
<version>11.6.2</version>
</dependency>
</dependencies>
😕 Oops.
@samtstern I've created https://github.com/firebase/FirebaseUI-Android/pull/1061. If you think it's good, we should probably release a new version of FUI pretty quick so people don't start getting NoSuchMethodExceptions from the support library.

Adding constraint layout dependency didn't fix it for me btw.
So if you have a quick fix whilst waiting for the PR merges? let me know
@blundell Really sorry about the messed up dependencies. You'll have to replace appcompat-v7 with design and upgrade to 27.0.2. Let me know how that goes and if any new errors show up. You might have to add other support lib dependencies too...
@SUPERCILEX We're also getting an error, but different from the above:
error: Error retrieving parent for item: No resource found that matches the given name 'FirebaseUI.AuthMethodPicker'.
@dimipaun I don't think that's related since the resource is a FirebaseUI one that we control. Try running a ./gradlew clean and see if that helps.
ok cool I got it to build like this:
dependencies {
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta4'
implementation 'com.firebaseui:firebase-ui-auth:3.1.1'
screenshot proof:

At least I can move forward now! thanks 👍 (and fwiw, it also works if I move these deps to 27.0.X versions)
moving to 27.0.2 all the dependencies is not working. same error.
Error:resource style/Widget.Design.TextInputLayout (aka com.loyaltycards.client.android:style/Widget.Design.TextInputLayout) not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
@blundell thanks for reporting the problem; I just experienced the same issue & the suggested bandaid also worked for me.
MethodPicker is causing issues, barrierDirection etc not found so i am assuming it's related to the BarrierView inside ConstraintLayout 1.1.0+ which is still inside beta. Also Why is this not a forced transitive dependency, had it not been for the comment above, i would've probably run around like a headless chicken trying to find why it's causing build errors.
@koolkvd we're working on it!
We have forced transitive deps on things that were part of our public API surface (like Firebase and Play services) but we are only now seeing that transitive dependencies on classes used in our layouts cause issues that are not easily detected by the Android plugin.
Also while we can and will address this here, I have filed a bug with Android as I think the tools should never have let us get this far:
https://issuetracker.google.com/70796598
@samtstern Put a dollar in the "posted staging link on Github" jar! 😆 I also filed an issue, dunno if it's related: https://issuetracker.google.com/issues/70795896.
Version 3.1.2 has been released which contains the POM-file fix for this issue.
Hey, I keep having a related (I think issue) - I had the ConstraintLayout problem, added com.android.support.constraint:constraint-layout:1.1.0-beta3 (also tried with 1.1.0-beta4) dependency and updated all the support libraries to 27.0.2. Now when building, I keep having this 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').
All the other errors have disappeared.
@samtstern I just tried the same with 3.1.2, still keeps happening.
Could you open a new issue for what you're seeing?
On Mon, Dec 18, 2017 at 1:52 PM Kuba Żurek notifications@github.com wrote:
Hey, I keep having a related (I think issue) - I had the ConstraintLayout
problem, added
com.android.support.constraint:constraint-layout:1.1.0-beta3 (also tried
with 1.1.0-beta4) dependency and updated all the support libraries to
27.0.2. Now when building, I keep having this error:/home/kuba/5a/appvisitas/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').All the other errors have disappeared.
@samtstern https://github.com/samtstern I just tried the same with 3.1.2,
still keeps happening.—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/firebase/FirebaseUI-Android/issues/1060#issuecomment-352569288,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIEw6pm5KZgKprlWgp4VcTnqaQewyyLCks5tBt6bgaJpZM4REU0X
.