Android : Object Cannot Be Added To An Existing List As Its Not Original Thread
I am working on an Android project in which I am working on chat functionality. In this, whenever a new message is received, I have to touch(literally) the screen, then only the ne
Solution 1:
It will be much easier if you would paste all stacktrace, but I am assuming that you are changing views not from main thread.
Use this to when calling methods that are doing something with views:
activity.runOnUiThread(new Runnable() {
publicvoidrun() {
methodThatIsDoingViewStuff();
}
});
Post a Comment for "Android : Object Cannot Be Added To An Existing List As Its Not Original Thread"