java.lang.IllegalStateException: Cannot add header view to grid -- setAdapter has already been called.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by Bugsbane
, 1 year ago
Cannot add header view to grid -- setAdapter has already been called.
via GitHub by cornzy
, 1 year ago
Cannot add header view to grid -- setAdapter has already been called.
java.lang.IllegalStateException: Cannot add header view to grid -- setAdapter has already been called.
at third_parties.in.srain.cube.GridViewWithHeaderAndFooter.addFooterView(GridViewWithHeaderAndFooter.java:183)
at com.owncloud.android.ui.fragment.ExtendedListFragment.setFooterEnabled(ExtendedListFragment.java:533)
at com.owncloud.android.ui.fragment.ExtendedListFragment.setFooterText(ExtendedListFragment.java:559)
at com.owncloud.android.ui.fragment.OCFileListFragment.updateLayout(OCFileListFragment.java:855)
at com.owncloud.android.ui.fragment.OCFileListFragment.listDirectory(OCFileListFragment.java:830)
at com.owncloud.android.ui.fragment.OCFileListFragment.onBrowseUp(OCFileListFragment.java:541)
at com.owncloud.android.ui.activity.FileDisplayActivity.onBackPressed(FileDisplayActivity.java:857)
at com.owncloud.android.ui.activity.FileDisplayActivity.onOptionsItemSelected(FileDisplayActivity.java:560)
at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:147)
at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
at android.view.View.performClick(View.java:5254)
at android.view.View$PerformClick.run(View.java:21173)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6838)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.