Skip to content Skip to sidebar Skip to footer

Failed To Call A Dynamic Method In A Static Context?

These are created using Android Studio similar to How to modify dummy content in android master/detail activity?. I changed the static method under dummyContent into below: public

Solution 1:

The Exception e, which you catch may contain useful information on what exactly went wrong. Do e.printStackTrace(); inside your catch-block to print all available information to the standard output. If that does not help you solve the problem post the stacktrace here.

Solution 2:

You cannot manipulate UI thread from background thread thats why you are getting this error.

ClassName.this.runOnUiThread(new Runnable() {
                publicvoidrun() {
                //Do something on UiThread// enclose your UI manipulated code here in these braces.
            }
        });

Post a Comment for "Failed To Call A Dynamic Method In A Static Context?"