2

I tried implementing FirebaseListAdapter in my project, but it kept breaking the app. After a long search between commit differences, I found the culprit to be my compile statement in the app build.gradle. Specifically the addition of the Firebase UI dependency:

compile 'com.firebaseui:firebase-ui-database:1.0.1'

My full dependencies also include Firebase auth and Firebase database

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.facebook.android:facebook-android-sdk:4.5.0'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:design:23.4.0'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'

    compile 'com.google.firebase:firebase-database:10.0.0'
    compile 'com.google.firebase:firebase-auth:10.0.0'
    compile 'com.firebaseui:firebase-ui-database:1.0.1'
}

According to the FirebaseUI repo firebase-ui-database:1.0.1 should work with the 10.0.0 dependencies, but I receive the following confusing error trace when launching the app:

java.lang.RuntimeException: Unable to start activity ComponentInfo{lsu.team4330.justask/lsu.team4330.justask.MainActivity}: android.view.InflateException: Binary XML file line #11: Binary XML file line #25: Error inflating class android.support.design.widget.FloatingActionButton
                                                                          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
                                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                                          at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                          at android.os.Looper.loop(Looper.java:148)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5422)
                                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                       Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #25: Error inflating class android.support.design.widget.FloatingActionButton
                                                                          at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
                                                                          at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                                                                          at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
                                                                          at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                                                                          at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
                                                                          at lsu.team4330.justask.MainActivity.onCreate(MainActivity.java:49)
                                                                          at android.app.Activity.performCreate(Activity.java:6251)
                                                                          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                                                                          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
                                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                                                                          at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                          at android.os.Looper.loop(Looper.java:148) 
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5422) 
                                                                          at java.lang.reflect.Method.invoke(Native Method) 
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Note: I have already commented out all code dependent on the error.

I do not receive this error after commenting out the UI dependency.

Ben
  • 757
  • 1
  • 7
  • 15
  • From the logcat, can you post the code at line 49 from `MainActivity.java`? Also, post the mentioned XML layout file. You might also want to try this http://stackoverflow.com/questions/30870443/inflateexception-with-floatingactionbutton-from-official-design-library – Wilik Dec 03 '16 at 17:30
  • I am also facing this issue – Rohit Dec 10 '16 at 10:11

0 Answers0