android.view.InflateException

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

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web5288

  • via Stack Overflow by sinanyil
    , 5 months ago
    Binary XML file line #18: <merge /> can be used only with a valid ViewGroup root and attachToRoot=true
  • <merge /> can be used only with a valid ViewGroup root and attachToRoot=true
  • via GitHub by JakeWharton
    , 1 year ago
    <merge /> can be used only with a valid ViewGroup root and attachToRoot=true
  • Stack trace

    • android.view.InflateException: Binary XML file line #18: <merge /> can be used only with a valid ViewGroup root and attachToRoot=true at android.view.LayoutInflater.inflate(LayoutInflater.java:539) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.support.design.widget.Snackbar.<init>(Snackbar.java:188) at android.support.design.widget.Snackbar.make(Snackbar.java:215) at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method) at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:30) at android.view.View.performClick(View.java:5204) at android.view.View$PerformClick.run(View.java:21153) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5480) 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: <merge /> can be used only with a valid ViewGroup root and attachToRoot=true at android.view.LayoutInflater.inflate(LayoutInflater.java:485) ... 14 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    2 times, 3 weeks ago
    Once, 2 months ago
    61 more bugmates