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:

https://www.jianshu.com/p/866743c0356b

https://blog.csdn.net/cf8833/article/details/90297775

Read More: