Unity Android solves the problem of information flow advertisement closing and error reporting

This error often occurs when unity connects to some native andorid SDKs:

W/system. Err: Android. View. Viewrootimpl $calledfromwrongthreadexception: only the original thread that created a view hierarchy can touch its views.
the solution is to use runonuithread() in the java file written by the Android layer

The reason is that the UI update of Android needs to be in the main UI thread, and some callbacks of the advertising SDK are not in this thread

reference material:



Read More: