FirebaseUI-Android: Can't use the library (3.1.1) with fresh project & latest tools
Welcome to FirebaseUI and thanks for submitting an issue!
- Android OS version: N/A build time issue
- FirebaseUI version: 3.1.1
Step 3: Describe the problem:
Cannot build the project when the Firebase auth dependency is added
Steps to reproduce:
- Create a new project in AndroidStudio 3.0 using the wizard, this gives you the default
build.gradle
- add
implementation 'com.firebaseui:firebase-ui-auth:3.1.1'
toapp/build.gradle
- This gives the error in the screenshot above
Observed Results:
Error: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
Expected Results:
The app to build
Relevant Code:
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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (6 by maintainers)
@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.
@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’.
@blundell Really sorry about the messed up dependencies. You’ll have to replace
appcompat-v7
withdesign
and upgrade to27.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…@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.
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:
But I’m not really a big fan of putting beta software in my production app, you know? 😃 @samtstern