android.view.InflateException: Binary XML file line #18: <merge /> can be used only with a valid ViewGroup root and attachToRoot=true

Stack Overflow | sinanyil | 2 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Snackbar <merge> error

    Stack Overflow | 2 months ago | sinanyil
    android.view.InflateException: Binary XML file line #18: <merge /> can be used only with a valid ViewGroup root and attachToRoot=true
  2. 0

    Snackbar issue (only in debug mode)

    Stack Overflow | 2 years ago | avb
    java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.support.design.widget.Snackbar$SnackbarLayout
  3. 0

    Android - Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference

    GitHub | 3 months ago | dot-ly
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Snackbar from Design Support library throws Null Pointer Exception after adding this library

    GitHub | 2 years ago | rahulrulez
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
  6. 0

    Display Snackbar in preference fragement

    Stack Overflow | 10 months ago | filol
    android.view.InflateException: Binary XML file line #18: Error inflating class android.support.design.widget.Snackbar$SnackbarLayout
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.view.InflateException

    <merge /> can be used only with a valid ViewGroup root and attachToRoot=true

    at android.view.LayoutInflater.inflate()
  2. Android Platform
    LayoutInflater.inflate
    1. android.view.LayoutInflater.inflate(LayoutInflater.java:485)
    2. android.view.LayoutInflater.inflate(LayoutInflater.java:423)
    2 frames
  3. android.support.design
    Snackbar.make
    1. android.support.design.widget.Snackbar.<init>(Snackbar.java:188)
    2. android.support.design.widget.Snackbar.make(Snackbar.java:215)
    2 frames
  4. mono.android.view
    View_OnClickListenerImplementor.onClick
    1. mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
    2. mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:30)
    2 frames
  5. Android Platform
    ActivityThread.main
    1. android.view.View.performClick(View.java:5204)
    2. android.view.View$PerformClick.run(View.java:21153)
    3. android.os.Handler.handleCallback(Handler.java:739)
    4. android.os.Handler.dispatchMessage(Handler.java:95)
    5. android.os.Looper.loop(Looper.java:148)
    6. android.app.ActivityThread.main(ActivityThread.java:5480)
    6 frames
  6. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  7. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    2 frames